change hook for perm_is_allowed while retaining backwards compatibility
This commit is contained in:
parent
4a49643bcd
commit
af14020e42
@ -314,11 +314,12 @@ function perm_is_allowed($uid, $observer_xchan, $permission) {
|
|||||||
'channel_id' => $uid,
|
'channel_id' => $uid,
|
||||||
'observer_hash' => $observer_xchan,
|
'observer_hash' => $observer_xchan,
|
||||||
'permission' => $permission,
|
'permission' => $permission,
|
||||||
'result' => false);
|
'result' => 'unset');
|
||||||
|
|
||||||
call_hooks('perm_is_allowed', $arr);
|
call_hooks('perm_is_allowed', $arr);
|
||||||
if($arr['result'])
|
if($arr['result'] !== 'unset') {
|
||||||
return true;
|
return $arr['result'];
|
||||||
|
}
|
||||||
|
|
||||||
$global_perms = \Zotlabs\Access\Permissions::Perms();
|
$global_perms = \Zotlabs\Access\Permissions::Perms();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user