aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-13 19:53:28 -0700
committerredmatrix <git@macgirvin.com>2016-07-13 19:53:28 -0700
commit1fd65c934da1efcbc3e44c5ec1c5112859ba50f9 (patch)
treef2d71a643080caace31370a71e2f365e22946f8d /include/permissions.php
parentb72720f6b6070fa5c5036f8600c82454b378d1d0 (diff)
downloadvolse-hubzilla-1fd65c934da1efcbc3e44c5ec1c5112859ba50f9.tar.gz
volse-hubzilla-1fd65c934da1efcbc3e44c5ec1c5112859ba50f9.tar.bz2
volse-hubzilla-1fd65c934da1efcbc3e44c5ec1c5112859ba50f9.zip
lots more permission work
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 5527d0afc..bc3cfdd2a 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -239,8 +239,13 @@ function get_all_perms($uid, $observer_xchan, $internal_use = true) {
// Permission granted to certain channels. Let's see if the observer is one of them
if($channel_perm & PERMS_SPECIFIC) {
- if(array_key_exists('my_perms',$abperms) && array_key_exists($perm_name,$abperms['my_perms']) && $abperms['my_perms'][$perm_name]) {
- $ret[$perm_name] = true;
+ if($abperms) {
+ foreach($abperms as $ab) {
+ if(($ab['cat'] == 'my_perms') && ($ab['k'] == $perm_name)) {
+ $ret[$perm_name] = (intval($ab['v']) ? true : false);
+ break;
+ }
+ }
continue;
}
}