diff --git a/module/Activity/src/Controller/AdminController.php b/module/Activity/src/Controller/AdminController.php index 9535ac7a55..ad38b2201b 100644 --- a/module/Activity/src/Controller/AdminController.php +++ b/module/Activity/src/Controller/AdminController.php @@ -441,7 +441,7 @@ public function externalSignoffAction(): Response|ViewModel */ public function viewAction(): ViewModel { - if (!$this->aclService->isAllowed('viewAdmin', 'activity')) { + if (!$this->aclService->isAllowed('view', 'activity_admin')) { throw new NotAllowedException($this->translator->translate('You are not allowed to administer activities')); } diff --git a/module/Activity/src/Service/AclService.php b/module/Activity/src/Service/AclService.php index 76f731f755..3d97075afa 100644 --- a/module/Activity/src/Service/AclService.php +++ b/module/Activity/src/Service/AclService.php @@ -4,6 +4,7 @@ namespace Activity\Service; +use Laminas\Permissions\Acl\Resource\GenericResource as Resource; use User\Permissions\Assertion\IsCreatorOrOrganMember; class AclService extends \User\Service\AclService @@ -12,13 +13,15 @@ protected function createAcl(): void { parent::createAcl(); - $this->acl->addResource('activity'); - $this->acl->addResource('activityApi'); - $this->acl->addResource('myActivities'); - $this->acl->addResource('model'); - $this->acl->addResource('activity_calendar_period'); - $this->acl->addResource('activity_calendar_proposal'); - $this->acl->addResource('signupList'); + $this->acl->addResource(new Resource('activity')); + $this->acl->addResource(new Resource('activityApi')); + $this->acl->addResource(new Resource('myActivities')); + $this->acl->addResource(new Resource('model')); + $this->acl->addResource(new Resource('activity_calendar_period')); + $this->acl->addResource(new Resource('activity_calendar_proposal')); + $this->acl->addResource(new Resource('signupList')); + // Define administration part of this module, however, sub-permissions must be manually configured. + $this->acl->addResource(new Resource('activity_admin')); $this->acl->allow('guest', 'activity', ['view', 'viewCategory']); $this->acl->allow('guest', 'signupList', ['view', 'externalSignup']); @@ -35,7 +38,7 @@ protected function createAcl(): void ['view', 'viewDetails', 'signup', 'signoff', 'checkUserSignedUp'], ); - $this->acl->allow('active_member', 'activity', ['create', 'viewAdmin', 'listCategories']); + $this->acl->allow('active_member', 'activity', ['create', 'listCategories']); $this->acl->allow( 'active_member', 'activity', @@ -48,6 +51,7 @@ protected function createAcl(): void ['adminSignup', 'viewParticipants', 'exportParticipants'], new IsCreatorOrOrganMember(), ); + $this->acl->allow('active_member', 'activity_admin', 'view'); $this->acl->allow('admin', 'activity', 'viewParticipantDetails'); $this->acl->allow('admin', 'activity', 'approve'); diff --git a/module/Application/language/en.po b/module/Application/language/en.po index 786336aee3..23b0fb8418 100644 --- a/module/Application/language/en.po +++ b/module/Application/language/en.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: GEWISweb 0.1.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-24 21:14+0200\n" -"PO-Revision-Date: 2024-08-24 21:16+0200\n" +"POT-Creation-Date: 2024-09-11 14:50+0200\n" +"PO-Revision-Date: 2024-09-11 14:51+0200\n" "Last-Translator: Tom Udding \n" "Language-Team: English \n" "Language: en\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4.4\n" +"X-Generator: Poedit 3.5\n" msgid " has a limited capacity and " msgstr " has a limited capacity and " @@ -118,6 +118,9 @@ msgstr "Actions" msgid "Activate" msgstr "Activate" +msgid "Activated" +msgstr "Activated" + msgid "Active" msgstr "Active" @@ -939,6 +942,9 @@ msgstr "Delete this news item" msgid "Delete this page" msgstr "Delete this page" +msgid "Deleted" +msgstr "Deleted" + msgid "Description" msgstr "Description" @@ -1219,6 +1225,9 @@ msgstr "Expiration date for the poll" msgid "Expired packages" msgstr "Expired packages" +msgid "Expires On" +msgstr "Expires On" + msgid "Exposure time" msgstr "Exposure time" @@ -1826,6 +1835,9 @@ msgstr "Member number" msgid "Members" msgstr "Members" +msgid "Membership Ends On" +msgstr "Membership Ends On" + msgid "Membership number" msgstr "Membership number" @@ -2203,6 +2215,9 @@ msgstr "Participants" msgid "Password" msgstr "Password" +msgid "Password Changed On" +msgstr "Password Changed On" + msgid "Password changed successfully" msgstr "Password changed successfully" @@ -2473,6 +2488,9 @@ msgstr "Revoked" msgid "Revoked authorizations for GMM %d" msgstr "Revoked authorizations for GMM %d" +msgid "Role(s)" +msgstr "Role(s)" + msgid "Root" msgstr "Root" @@ -3671,6 +3689,9 @@ msgstr "You are not allowed to administer option calendar periods" msgid "You are not allowed to administer polls" msgstr "You are not allowed to administer polls" +msgid "You are not allowed to administer users" +msgstr "You are not allowed to administer users" + msgid "You are not allowed to approve polls" msgstr "You are not allowed to approve polls" diff --git a/module/Application/language/gewisweb.pot b/module/Application/language/gewisweb.pot index 81bfc02e3d..cfb259224b 100644 --- a/module/Application/language/gewisweb.pot +++ b/module/Application/language/gewisweb.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GEWISweb v2.8.6-747-ge3d122d45-dirty\n" +"Project-Id-Version: GEWISweb v2.8.6-764-gabeeb8c00-dirty\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-24 21:14+0200\n" +"POT-Creation-Date: 2024-09-11 14:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -117,6 +117,9 @@ msgstr "" msgid "Activate" msgstr "" +msgid "Activated" +msgstr "" + msgid "Active" msgstr "" @@ -893,6 +896,9 @@ msgstr "" msgid "Delete this page" msgstr "" +msgid "Deleted" +msgstr "" + msgid "Description" msgstr "" @@ -1163,6 +1169,9 @@ msgstr "" msgid "Expired packages" msgstr "" +msgid "Expires On" +msgstr "" + msgid "Exposure time" msgstr "" @@ -1719,6 +1728,9 @@ msgstr "" msgid "Members" msgstr "" +msgid "Membership Ends On" +msgstr "" + msgid "Membership number" msgstr "" @@ -2090,6 +2102,9 @@ msgstr "" msgid "Password" msgstr "" +msgid "Password Changed On" +msgstr "" + msgid "Password changed successfully" msgstr "" @@ -2343,6 +2358,9 @@ msgstr "" msgid "Revoked authorizations for GMM %d" msgstr "" +msgid "Role(s)" +msgstr "" + msgid "Root" msgstr "" @@ -3433,6 +3451,9 @@ msgstr "" msgid "You are not allowed to administer polls" msgstr "" +msgid "You are not allowed to administer users" +msgstr "" + msgid "You are not allowed to approve polls" msgstr "" diff --git a/module/Application/language/nl.po b/module/Application/language/nl.po index 1bcdb3205c..3cd3d9643e 100644 --- a/module/Application/language/nl.po +++ b/module/Application/language/nl.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: GEWISweb 0.1.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-24 21:14+0200\n" -"PO-Revision-Date: 2024-08-24 21:15+0200\n" +"POT-Creation-Date: 2024-09-11 14:50+0200\n" +"PO-Revision-Date: 2024-09-11 14:51+0200\n" "Last-Translator: Tom Udding \n" "Language-Team: English \n" "Language: nl\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4.4\n" +"X-Generator: Poedit 3.5\n" msgid " has a limited capacity and " msgstr " heeft een beperkte capaciteit en " @@ -118,6 +118,9 @@ msgstr "Acties" msgid "Activate" msgstr "Activeer" +msgid "Activated" +msgstr "Geactiveerd" + msgid "Active" msgstr "Actief" @@ -944,6 +947,9 @@ msgstr "Verwijder dit nieuwsitem" msgid "Delete this page" msgstr "Verwijder deze pagina" +msgid "Deleted" +msgstr "Verwijderd" + msgid "Description" msgstr "Beschrijving" @@ -1230,6 +1236,9 @@ msgstr "Verloopdatum van de poll" msgid "Expired packages" msgstr "Verlopen pakketten" +msgid "Expires On" +msgstr "Verloopt op" + msgid "Exposure time" msgstr "Belichtingstijd" @@ -1850,6 +1859,9 @@ msgstr "Lidmaatschapsnummer" msgid "Members" msgstr "Leden" +msgid "Membership Ends On" +msgstr "Lidmaatschap eindigt op" + msgid "Membership number" msgstr "Lidmaatschapsnummer" @@ -2226,6 +2238,9 @@ msgstr "Deelnemers" msgid "Password" msgstr "Wachtwoord" +msgid "Password Changed On" +msgstr "Wachtwoord gewijzigd op" + msgid "Password changed successfully" msgstr "Wachtwoord succesvol gewijzigd" @@ -2498,6 +2513,9 @@ msgstr "Ingetrokken" msgid "Revoked authorizations for GMM %d" msgstr "Ingetrokken machtigingen voor ALV %d" +msgid "Role(s)" +msgstr "Rol(len)" + msgid "Root" msgstr "Root" @@ -3713,6 +3731,9 @@ msgstr "Je hebt niet de rechten om optieperiodes te beheren" msgid "You are not allowed to administer polls" msgstr "Je hebt niet de rechten om poll-instellingen te beheren" +msgid "You are not allowed to administer users" +msgstr "Je hebt niet de rechten om gebruikers te beheren" + msgid "You are not allowed to approve polls" msgstr "Je hebt niet de rechten om polls goed te keuren" diff --git a/module/Application/view/partial/admin.phtml b/module/Application/view/partial/admin.phtml index 9f5b916ed4..76f8dc62ab 100644 --- a/module/Application/view/partial/admin.phtml +++ b/module/Application/view/partial/admin.phtml @@ -21,8 +21,7 @@ use Laminas\View\Renderer\PhpRenderer;