diff options
Diffstat (limited to 'include/permissions.php')
-rw-r--r-- | include/permissions.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/permissions.php b/include/permissions.php index a3ec13925..9fded3b43 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -126,6 +126,13 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) { } } + // system is blocked to anybody who is not authenticated + + if((! $observer_xchan) && intval(get_config('system','block_public'))) { + $ret[$perm_name] = false; + continue; + } + // Check if this $uid is actually the $observer_xchan - if it's your content // you always have permission to do anything @@ -282,6 +289,11 @@ function perm_is_allowed($uid,$observer_xchan,$permission) { } } + // system is blocked to anybody who is not authenticated + + if((! $observer_xchan) && intval(get_config('system','block_public'))) + return false; + // Check if this $uid is actually the $observer_xchan if($r[0]['channel_hash'] === $observer_xchan) |