diff options
author | zotlabs <mike@macgirvin.com> | 2017-04-02 20:03:27 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-04-02 20:03:27 -0700 |
commit | af14020e42481088f0e9f2773bda6453b60bcdb9 (patch) | |
tree | 25c1b6f6fedf6fa690269138c13a30cf8c9fb240 | |
parent | 4a49643bcd125fde6c62c37a2d0a7902bbf502d7 (diff) | |
download | volse-hubzilla-af14020e42481088f0e9f2773bda6453b60bcdb9.tar.gz volse-hubzilla-af14020e42481088f0e9f2773bda6453b60bcdb9.tar.bz2 volse-hubzilla-af14020e42481088f0e9f2773bda6453b60bcdb9.zip |
change hook for perm_is_allowed while retaining backwards compatibility
-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(); |