From 8ef4d5c451b44de93d1b3c04f7132a23f7759690 Mon Sep 17 00:00:00 2001 From: marcelmanzel Date: Mon, 12 Aug 2024 17:19:18 +0200 Subject: [PATCH] OXDEV-8216: Add new right to de-/activate modules --- src/Module/Controller/ModuleActivationController.php | 4 ++-- src/Shared/Service/PermissionProvider.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Module/Controller/ModuleActivationController.php b/src/Module/Controller/ModuleActivationController.php index 8a79cbf..952a99d 100644 --- a/src/Module/Controller/ModuleActivationController.php +++ b/src/Module/Controller/ModuleActivationController.php @@ -28,7 +28,7 @@ public function __construct( */ #[Mutation] #[Logged] - #[Right('CHANGE_CONFIGURATION')] + #[Right('ACTIVATE_MODULE')] public function activateModule(string $moduleId): bool { return $this->moduleActivationService->activateModule(moduleId: $moduleId); @@ -41,7 +41,7 @@ public function activateModule(string $moduleId): bool */ #[Mutation] #[Logged] - #[Right('CHANGE_CONFIGURATION')] + #[Right('ACTIVATE_MODULE')] public function deactivateModule(string $moduleId): bool { return $this->moduleActivationService->deactivateModule(moduleId: $moduleId); diff --git a/src/Shared/Service/PermissionProvider.php b/src/Shared/Service/PermissionProvider.php index 35e09fe..844a426 100644 --- a/src/Shared/Service/PermissionProvider.php +++ b/src/Shared/Service/PermissionProvider.php @@ -17,7 +17,8 @@ public function getPermissions(): array { return [ 'oxidadmin' => [ - 'CHANGE_CONFIGURATION' + 'CHANGE_CONFIGURATION', + 'ACTIVATE_MODULE' ], ]; }