Commit 39be1d1d authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic

Bug 1855614: added missing check for isolated institution property

behatnotneeded

Change-Id: Ic7d7a0a3ac8ae154ffdcd020b051577ad86d4cdb
parent 7cc60855
......@@ -93,7 +93,7 @@ $restrictedview = !can_view_view($viewid);
if ($restrictedview && !$USER->is_logged_in()) {
throw new AccessDeniedException();
}
else if ($restrictedview) {
else if ($restrictedview && is_isolated()) {
// Check if isolated institutions are on and user being viewed is a site admin
// or both users are in no institution
$userinsts = $userobj->get('institutions');
......@@ -104,6 +104,8 @@ else if ($restrictedview) {
}
}
$blocksjs = '';
$layoutjs = array();
if (!$restrictedview) {
if ($newlayout = $view->uses_new_layout()) {
$layoutjs = array('js/lodash/lodash.js', 'js/gridstack/gridstack.js', 'js/gridlayout.js');
......
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