Commit f27ca900 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1770496: Validate access for member to a public group



When site public pages are turned off.

If the user is a member of a group that has 'public' access and the
site 'Allow public pages' are turned off, the user should be able to
view the group's home page - therefore allowing them to paginate
through the "Group portfolios" block in the group home page.

behatnotneeded

Change-Id: I1ea49927532f967c8a676b8a1590d1db3787cfc2
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 7d9d1b29)
parent 13473848
...@@ -2991,6 +2991,10 @@ function can_view_view($view, $user_id=null) { ...@@ -2991,6 +2991,10 @@ function can_view_view($view, $user_id=null) {
if ($publicviews) { if ($publicviews) {
return true; return true;
} }
else if ($view->get('type') == 'grouphomepage') {
// If the group is public then the homepage should be available
return true;
}
else if ($publicprofiles && $view->get('type') == 'profile') { else if ($publicprofiles && $view->get('type') == 'profile') {
return true; return true;
} }
......
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