From 019e30574579d835eba4ad7cfe786514d8e48203 Mon Sep 17 00:00:00 2001 From: sviluppo-giacomo Date: Fri, 16 May 2025 09:14:50 +0200 Subject: [PATCH] Add licenze-update resource and its controller Introduced a new `licenze-update` resource and updated ACL to grant `user` role access to it. Added the `LicenzeUpdateController` with default methods implemented as no-ops. This prepares the system for future functionality related to updating licenses. --- .../controllers/LicenzeUpdateController.php | 39 +++++++++++++++++++ library/App/Model/Acl/AclRestV1.php | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 application/modules/v1/controllers/LicenzeUpdateController.php diff --git a/application/modules/v1/controllers/LicenzeUpdateController.php b/application/modules/v1/controllers/LicenzeUpdateController.php new file mode 100644 index 0000000..2696d07 --- /dev/null +++ b/application/modules/v1/controllers/LicenzeUpdateController.php @@ -0,0 +1,39 @@ +_resourceName = 'Licenze'; + parent::init(); + } + + public function getAction() + { + $this->disableCallAction(); + } + + public function postDispatch() + { + $this->disableCallAction(); + } + + public function patchAction() + { + $this->disableCallAction(); + } + + public function deleteAction() + { + $this->disableCallAction(); + } + + //----------------------------------------------- + + public function switchMethodFunction($method) + { + $this->disableCallAction(); + } + +}//END CLASS diff --git a/library/App/Model/Acl/AclRestV1.php b/library/App/Model/Acl/AclRestV1.php index 38fa067..2cf3bac 100644 --- a/library/App/Model/Acl/AclRestV1.php +++ b/library/App/Model/Acl/AclRestV1.php @@ -20,7 +20,8 @@ class App_Model_Acl_AclRestV1 extends Zend_Acl $this->addRole(new Zend_Acl_Role('user'), 'unregistered') ->add(new Zend_Acl_Resource('emails')) ->add(new Zend_Acl_Resource('licenze')) - ->allow('user', array('emails','licenze')); + ->add(new Zend_Acl_Resource('licenze-update')) + ->allow('user', array('emails','licenze','licenze-update')); // ACL for administrator $this->addRole(new Zend_Acl_Role('admin'), 'user')