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.
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class V1_LicenzeUpdateController extends App_Controller_Rest_Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->_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
|
||||||
@@ -20,7 +20,8 @@ class App_Model_Acl_AclRestV1 extends Zend_Acl
|
|||||||
$this->addRole(new Zend_Acl_Role('user'), 'unregistered')
|
$this->addRole(new Zend_Acl_Role('user'), 'unregistered')
|
||||||
->add(new Zend_Acl_Resource('emails'))
|
->add(new Zend_Acl_Resource('emails'))
|
||||||
->add(new Zend_Acl_Resource('licenze'))
|
->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
|
// ACL for administrator
|
||||||
$this->addRole(new Zend_Acl_Role('admin'), 'user')
|
$this->addRole(new Zend_Acl_Role('admin'), 'user')
|
||||||
|
|||||||
Reference in New Issue
Block a user