Commit 3e50b1ab authored by Lisa Seeto's avatar Lisa Seeto Committed by Robert Lyon
Browse files

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


Bug 1911817: User and group access roles for Edit access drop-down is populated by more than one source

 - change the way user and group roles are populated using
   the same methods in from the pieform

Change-Id: If9792e783a4ec1571145941d8161ad6e2b4655ae
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
(cherry picked from commit 9f25a50f)
parent a2f74f0a
......@@ -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(
......
Supports Markdown
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