From a026832009608d9a492be35b9b462cf00a36d59d Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Fri, 4 Oct 2013 15:57:48 +0100 Subject: If an observer doesn't have view_stream perms, try for view_profile before giving up. --- mod/channel.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/channel.php') diff --git a/mod/channel.php b/mod/channel.php index 5a66f5e07..e5af91b53 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -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; } -- cgit v1.2.3