From 39be1d1d4eb3f1024a52dd9eaa86fed737336c33 Mon Sep 17 00:00:00 2001 From: Cecilia Vela Gurovic Date: Mon, 9 Dec 2019 14:41:14 +1300 Subject: [PATCH] Bug 1855614: added missing check for isolated institution property behatnotneeded Change-Id: Ic7d7a0a3ac8ae154ffdcd020b051577ad86d4cdb --- htdocs/user/view.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/user/view.php b/htdocs/user/view.php index bbd164b7b2..fa31039cc3 100644 --- a/htdocs/user/view.php +++ b/htdocs/user/view.php @@ -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'); -- GitLab