public function doUpdateDomainAction($domainid, $params)
 {
     $role = new \Innomatic\Domain\User\Role(\Innomatic\Domain\User\Role::getIdFromName($params['name']));
     return $role->setTitle($params['title'])->setDescription($params['description'])->setCatalog($params['catalog'])->setApplication($this->appname)->store();
 }
Beispiel #2
0
 /**
  * Removes a previously assigned role.
  *
  * @param integer|string $role Role identifier number or string,
  * it gets automatically decoded to the identifier number.
  * @access public
  * @return boolean
  */
 public function unassignRole($role)
 {
     if (!is_int($this->id)) {
         return false;
     }
     // If the role has been given by name, get its id
     if (!is_int($role)) {
         $role = Role::getIdFromName($role);
         if ($role === false) {
             return false;
         }
     }
     return $this->dataAccess->execute("DELETE\n            FROM domain_roles_permissions\n            WHERE roleid={$role} and permissionid={$this->id}");
 }