aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-04-02 20:03:27 -0700
committerMario Vavti <mario@mariovavti.com>2017-04-03 10:52:52 +0200
commitd35678b89126104d4665b9b4d9ae04e504b5f2d1 (patch)
tree22624a4b75f9f25a0a7cae1386d898e2b43b1f27 /include
parent405e3fc21459015a63753d4fbd219d5f9920829b (diff)
downloadvolse-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.php7
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();