Commit 849de7b8 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Institutional admins can only see current institution & default when editing users

parent bab53961
......@@ -203,7 +203,7 @@ function edituser_site_submit(Pieform $form, $values) {
$allinstitutions = get_records_array('institution');
$options = array();
foreach ($allinstitutions as $i) {
if ($USER->get('admin') || $i->name == 'mahara' || $USER->is_institutional_admin($i->name)) {
if ($USER->get('admin') || $i->name == 'mahara' || $i->name == $userinstitution->institution) {
$options[$i->name] = $i->displayname;
}
}
......
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