Announcements: Add user roles in the form - refs BT#21102

pull/4923/head
christian 2 years ago
parent 6a948b2b68
commit 71ab2c8d3b
  1. 2
      public/main/admin/system_announcements.php
  2. 15
      public/main/inc/lib/api.lib.php

@ -33,7 +33,7 @@ $interbreadcrumb[] = [
$repo = Container::getSysAnnouncementRepository();
$visibleList = $repo->getVisibilityList();
$visibleList = api_get_user_roles();
$tool_name = null;
if (empty($_GET['lang'])) {

@ -6312,6 +6312,21 @@ function api_get_roles()
return $roles;
}
function api_get_user_roles(): array
{
$roles = [
'ROLE_TEACHER',
'ROLE_STUDENT',
'ROLE_RRHH',
'ROLE_SESSION_MANAGER',
'ROLE_STUDENT_BOSS',
'ROLE_INVITEE',
'ROLE_USER',
];
return array_combine($roles, $roles);
}
/**
* @param string $file
*

Loading…
Cancel
Save