diff --git a/htdocs/user/view.php b/htdocs/user/view.php index bbd164b7b2551a5bf2c2f8a6f03418961d434c19..fa31039cc38d1a9e4e314960d3488f387f4d3207 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');