aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-19 17:53:52 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-19 17:53:52 -0700
commitec00c5b18a1efea64517b18fa12bb9df6f0b95f7 (patch)
tree8a0bc1c5d6e920bbc32b0deaa25f7d3be677a2b3 /mod
parented3d9d1f80773417b0fba491ed762b90be340863 (diff)
downloadvolse-hubzilla-ec00c5b18a1efea64517b18fa12bb9df6f0b95f7.tar.gz
volse-hubzilla-ec00c5b18a1efea64517b18fa12bb9df6f0b95f7.tar.bz2
volse-hubzilla-ec00c5b18a1efea64517b18fa12bb9df6f0b95f7.zip
the view_photos and post_photos permissions are redundant and are now mapped to view_storage and write_storage
Diffstat (limited to 'mod')
-rw-r--r--mod/editblock.php2
-rw-r--r--mod/editwebpage.php5
-rw-r--r--mod/photo.php2
-rw-r--r--mod/photos.php6
4 files changed, 6 insertions, 9 deletions
diff --git a/mod/editblock.php b/mod/editblock.php
index 818dc5ec7..b4d954ef5 100644
--- a/mod/editblock.php
+++ b/mod/editblock.php
@@ -137,7 +137,7 @@ function editblock_content(&$a) {
'$underline' => t('Underline'),
'$quote' => t('Quote'),
'$code' => t('Code'),
- '$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')),
+ '$writefiles' => perm_is_allowed($owner, get_observer_hash(), 'write_storage'),
'$upload' => t('Upload photo'),
'$attach' => t('Attach file'),
'$weblink' => t('Insert web link'),
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index 3b0b543a6..974e8cc38 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -165,15 +165,12 @@ function editwebpage_content(&$a) {
$rp = 'webpages/' . $which;
- logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')));
-
$editor = replace_macros($tpl,array(
'$return_path' => $rp,
'$webpage' => ITEM_TYPE_WEBPAGE,
'$placeholdpagetitle' => t('Page link title'),
'$pagetitle' => $page_title,
- '$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')),
-
+ '$writefiles' => perm_is_allowed($owner, get_observer_hash(), 'write_storage'),
'$action' => 'item',
'$share' => t('Edit'),
'$bold' => t('Bold'),
diff --git a/mod/photo.php b/mod/photo.php
index 2e16fc1d9..e8cd95f1c 100644
--- a/mod/photo.php
+++ b/mod/photo.php
@@ -123,7 +123,7 @@ function photo_init(&$a) {
);
if($r) {
- $allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_photos') : true);
+ $allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_storage') : true);
$sql_extra = permissions_sql($r[0]['uid']);
diff --git a/mod/photos.php b/mod/photos.php
index c65c87c27..b65218e94 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -63,7 +63,7 @@ function photos_post(&$a) {
$page_owner_uid = $a->data['channel']['channel_id'];
- if(perm_is_allowed($page_owner_uid,get_observer_hash(),'post_photos'))
+ if(perm_is_allowed($page_owner_uid,get_observer_hash(),'write_storage'))
$can_post = true;
if(! $can_post) {
@@ -495,8 +495,8 @@ function photos_content(&$a) {
$observer = $a->get_observer();
- $can_post = perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_photos');
- $can_view = perm_is_allowed($owner_uid,$observer['xchan_hash'],'view_photos');
+ $can_post = perm_is_allowed($owner_uid,$observer['xchan_hash'],'write_storage');
+ $can_view = perm_is_allowed($owner_uid,$observer['xchan_hash'],'view_storage');
if(! $can_view) {
notice( t('Access to this item is restricted.') . EOL);