Commit 7d9d1b29 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>
parent 4bf5d679
......@@ -3011,6 +3011,10 @@ function can_view_view($view, $user_id=null) {
if ($publicviews) {
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') {
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