Beispiel #1
0
 private function _addElementRole()
 {
     $this->addElement('select', 'acl_role_id', array('required' => true, 'label' => 'User role', 'dimension' => 6));
     $el = $this->getElement('acl_role_id');
     $roleDomain = new User_Domain_Role();
     $roles = $roleDomain->getAll(Zend_Auth::getInstance()->getIdentity()->appaccount_id);
     foreach ($roles as $r) {
         $el->addMultiOption($r->getId(), $r->getName());
     }
     if ($this->_model && $this->_model->getAcl_role_id()) {
         $el->setValue($this->_model->acl_role_id);
     }
 }
 public function listAction()
 {
     if ($this->_isUserAllowed(User_Module_Acl::ACL_RESOURCE_USERROLE, User_Module_Acl::ACL_RESOURCE_USERROLE_PRIVILEGE_LIST)) {
         $roles = new User_Domain_Role(null);
         $this->view->roles = $roles->getAll(Zend_Auth::getInstance()->getIdentity()->appaccount_id);
     }
 }