public function init() { parent::init(); $excluded = array('admin_application_list', 'admin_application_new', 'admin_application_set', 'admin_application_createpost', 'front_index_noroute', 'front_index_error'); // Test si un id de value est passé en paramètre if ($id = $this->getRequest()->getParam('option_value_id')) { // Créé et charge l'objet $this->_current_option_value = new Application_Model_Option_Value(); $this->_current_option_value->find($id); } }
public function init() { parent::init(); // Options ACL $application_acl_option = new Application_Model_Acl_Option(); $denied_options = $application_acl_option->findAllByAppAndAdminId($this->getApplication()->getId(), $this->getAdmin()->getId()); $this->_getAcl()->denyResources($denied_options, true); $excluded = array('admin_application_list', 'admin_application_new', 'admin_application_set', 'admin_application_createpost', 'front_index_noroute', 'front_index_error'); // Test si un id de value est passé en paramètre if ($id = $this->getRequest()->getParam('option_value_id') or $id = $this->getRequest()->getParam('value_id')) { // Créé et charge l'objet $this->_current_option_value = new Application_Model_Option_Value(); $this->_current_option_value->find($id); } $this->getSession()->editing_app_id = $this->getApplication()->getId(); if ($this->getApplication()->isSomeoneElseEditingIt()) { $this->getSession()->addWarning($this->_("Careful, someone else is working on this application."), "two_editing_the_same_app"); } }
protected function _initAcl() { if (!$this->getRequest()->isInstalling()) { $is_editor = !$this->getRequest()->isApplication() && !$this->_isInstanceOfBackoffice(); if ($is_editor and $this->getSession()->isLoggedIn()) { $acl = new Acl_Model_Acl(); $acl->prepare($this->getSession()->getAdmin()); Core_View_Default::setAcl($acl); Admin_Controller_Default::setAcl($acl); } } }
public static function setAcl($acl) { self::$_acl = $acl; }