Commit d35678b8 authored by Zot's avatar Zot Committed by Mario

change hook for perm_is_allowed while retaining backwards compatibility

parent 405e3fc2
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment