Skip to content

Commit

Permalink
Allow session admin to search classes BT#18810
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed May 26, 2021
1 parent 59cdc5f commit 0081fc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/inc/ajax/usergroup.ajax.php
Expand Up @@ -13,7 +13,9 @@
switch ($action) {
case 'get_class_by_keyword':
$keyword = isset($_REQUEST['q']) ? $_REQUEST['q'] : '';
if (api_is_platform_admin() && !empty($keyword)) {
$allow = api_is_platform_admin() || api_is_session_admin();

if ($allow && !empty($keyword)) {
$userGroup = new UserGroup();
$where = ['where' => ['name like ?' => "%$keyword%"], 'order' => 'name '];
$items = [];
Expand Down

0 comments on commit 0081fc7

Please sign in to comment.