diff options
author | zotlabs <mike@macgirvin.com> | 2017-04-02 20:03:27 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-04-03 10:52:52 +0200 |
commit | d35678b89126104d4665b9b4d9ae04e504b5f2d1 (patch) | |
tree | 22624a4b75f9f25a0a7cae1386d898e2b43b1f27 /include | |
parent | 405e3fc21459015a63753d4fbd219d5f9920829b (diff) | |
download | volse-hubzilla-d35678b89126104d4665b9b4d9ae04e504b5f2d1.tar.gz volse-hubzilla-d35678b89126104d4665b9b4d9ae04e504b5f2d1.tar.bz2 volse-hubzilla-d35678b89126104d4665b9b4d9ae04e504b5f2d1.zip |
change hook for perm_is_allowed while retaining backwards compatibility
Diffstat (limited to 'include')
-rw-r--r-- | include/permissions.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/permissions.php b/include/permissions.php index d21b45550..f719394c5 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -314,11 +314,12 @@ function perm_is_allowed($uid, $observer_xchan, $permission) { 'channel_id' => $uid, 'observer_hash' => $observer_xchan, 'permission' => $permission, - 'result' => false); + 'result' => 'unset'); call_hooks('perm_is_allowed', $arr); - if($arr['result']) - return true; + if($arr['result'] !== 'unset') { + return $arr['result']; + } $global_perms = \Zotlabs\Access\Permissions::Perms(); |