Skip to content
Snippets Groups Projects
Verified Commit a94d86a6 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #11266 TIME 0:05 rest route for shortcuts

parent 1b304d2d
No related branches found
No related tags found
No related merge requests found
...@@ -127,14 +127,19 @@ class CoreController ...@@ -127,14 +127,19 @@ class CoreController
$shortcuts[] = ['id' => 'search']; $shortcuts[] = ['id' => 'search'];
} }
} }
$indexingGroups = [];
foreach ($userGroups as $group) { foreach ($userGroups as $group) {
if ($group['can_index']) { if ($group['can_index']) {
$shortcuts[] = [ $indexingGroups[] = ['id' => $group['id'], 'label' => $group['group_desc']];
'id' => 'indexing',
'groups' => ['id' => $group['id'], 'label' => $group['group_desc']]
];
} }
} }
if (!empty($indexingGroups)) {
$shortcuts[] = [
'id' => 'indexing',
'groups' => $indexingGroups
];
}
return $response->withJson([ return $response->withJson([
'shortcuts' => $shortcuts 'shortcuts' => $shortcuts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment