Skip to content

Commit

Permalink
VACMS-14793: Adds check for admin.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsasser committed Sep 11, 2023
1 parent 0a1731b commit 0e31ab6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public static function getSubscribedEvents(): array {
public function formAlter(FormAlterEvent $event): void {
$form = &$event->getForm();
$formId = $event->getFormId();
if (in_array($formId, $this->menus)) {
$admin = $this->permsService->hasAdminRole(TRUE);
if (in_array($formId, $this->menus) && $admin) {
$this->hideMenuLinkDescriptionField($form);
}
}
Expand Down

0 comments on commit 0e31ab6

Please sign in to comment.