diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-19 17:53:52 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-19 17:53:52 -0700 |
commit | ec00c5b18a1efea64517b18fa12bb9df6f0b95f7 (patch) | |
tree | 8a0bc1c5d6e920bbc32b0deaa25f7d3be677a2b3 /include/photos.php | |
parent | ed3d9d1f80773417b0fba491ed762b90be340863 (diff) | |
download | volse-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 'include/photos.php')
-rw-r--r-- | include/photos.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/photos.php b/include/photos.php index 867571f8f..c5ea3971a 100644 --- a/include/photos.php +++ b/include/photos.php @@ -22,7 +22,7 @@ function photo_upload($channel, $observer, $args) { $channel_id = $channel['channel_id']; $account_id = $channel['channel_account_id']; - if(! perm_is_allowed($channel_id, $observer['xchan_hash'], 'post_photos')) { + if(! perm_is_allowed($channel_id, $observer['xchan_hash'], 'write_storage')) { $ret['message'] = t('Permission denied.'); return $ret; } @@ -313,7 +313,7 @@ function photo_upload($channel, $observer, $args) { * * @param array $channel * @param array $observer - * @return bool|array false if no view_photos permission or an array + * @return bool|array false if no view_storage permission or an array * * success (bool) * * albums (array) */ @@ -322,7 +322,7 @@ function photos_albums_list($channel, $observer) { $channel_id = $channel['channel_id']; $observer_xchan = (($observer) ? $observer['xchan_hash'] : ''); - if(! perm_is_allowed($channel_id, $observer_xchan, 'view_photos')) + if(! perm_is_allowed($channel_id, $observer_xchan, 'view_storage')) return false; /** @FIXME create a permissions SQL which works on arbitrary observers and channels, regardless of login or web status */ @@ -378,7 +378,7 @@ function photos_album_widget($channelx,$observer,$albums = null) { '$title' => t('Photo Albums'), '$albums' => $albums['albums'], '$baseurl' => z_root(), - '$upload' => ((perm_is_allowed($channelx['channel_id'],(($observer) ? $observer['xchan_hash'] : ''),'post_photos')) + '$upload' => ((perm_is_allowed($channelx['channel_id'],(($observer) ? $observer['xchan_hash'] : ''),'write_storage')) ? t('Upload New Photos') : '') )); } @@ -399,7 +399,7 @@ function photos_list_photos($channel, $observer, $album = '') { $channel_id = $channel['channel_id']; $observer_xchan = (($observer) ? $observer['xchan_hash'] : ''); - if(! perm_is_allowed($channel_id,$observer_xchan,'view_photos')) + if(! perm_is_allowed($channel_id,$observer_xchan,'view_storage')) return false; $sql_extra = permissions_sql($channel_id); |