If an observer doesn't have view_stream perms, try for view_profile before
giving up.
This commit is contained in:
parent
ff7182f441
commit
a026832009
@ -115,6 +115,11 @@ function channel_content(&$a, $update = 0, $load = false) {
|
||||
$perms = get_all_perms($a->profile['profile_uid'],$ob_hash);
|
||||
|
||||
if(! $perms['view_stream']) {
|
||||
// We may want to make the target of this redirect configurable
|
||||
if($perms['view_profile']) {
|
||||
notice( t('Insufficient permissions. Request redirected to profile page.') . EOL);
|
||||
goaway (z_root() . "/profile/" . $a->profile['channel_address']);
|
||||
}
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user