Commit 8e285125 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1911817: User and group access roles for Edit access drop-down is...

Merge "Bug 1911817: User and group access roles for Edit access drop-down is populated by more than one source"
parents 3d6a17d3 9f25a50f
......@@ -128,12 +128,9 @@ switch ($type) {
$data['data'][$key] = $info;
}
}
$roles = get_records_array('usr_access_roles');
$data['roles'] = array();
foreach ($roles as $r) {
$data['roles'][] = array('name' => $r->role, 'display' => get_string($r->role, 'view'));
}
require_once(get_config('libroot') . 'view.php');
$roles = View::get_user_access_roles();
$data['roles'] = $roles;
break;
case 'group':
require_once('group.php');
......@@ -151,11 +148,8 @@ switch ($type) {
$institutions = array();
}
$data = search_group($query, $limit, $offset, $type, $groupcategory, $institutions);
$roles = get_records_array('grouptype_roles');
$data['roles'] = array();
foreach ($roles as $r) {
$data['roles'][$r->grouptype][] = array('name' => $r->role, 'display' => get_string($r->role, 'grouptype.'.$r->grouptype));
}
$roles = get_group_access_roles();
$data['roles'] = $roles;
if (!empty($data['data'])) {
foreach ($data['data'] as $key => $value) {
$info = array(
......
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