Commit a1fee4fb authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Allow site admin to use institution admin/staff pages

parent 61b1cf22
......@@ -73,7 +73,7 @@ function adminusers_submit(Pieform $form, $values) {
global $SESSION, $USER;
$inst = $values['institution'];
if (empty($inst) || !$USER->is_institutional_admin($inst)) {
if (empty($inst) || !$USER->can_edit_institution($inst)) {
$SESSION->add_error_msg(get_string('notadminforinstitution', 'admin'));
redirect('/admin/users/institutionadmins.php');
}
......
......@@ -73,7 +73,7 @@ function staffusers_submit(Pieform $form, $values) {
global $SESSION, $USER;
$inst = $values['institution'];
if (empty($inst) || !$USER->is_institutional_admin($inst)) {
if (empty($inst) || !$USER->can_edit_institution($inst)) {
$SESSION->add_error_msg(get_string('notadminforinstitution', 'admin'));
redirect('/admin/users/institutionstaff.php');
}
......
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