Short description of method remove

@access public
@author Jehan Bihin, <jehan.bihin@tudor.lu>
@param  string $roleUri
@param  string $accessUri
@return mixed
337345
public function remove($roleUri, $accessUri)
    {
        
		$uri = explode('#', $accessUri);
		list($type, $ext, $mod, $act) = explode('_', $uri[1]);
		
		$role = new \core_kernel_classes_Class($roleUri);
		$actionAccessProperty = new \core_kernel_classes_Property(static::PROPERTY_ACL_GRANTACCESS);
		
		$module = new \core_kernel_classes_Resource($this->makeEMAUri($ext, $mod));
		$controllerClassName = MapHelper::getControllerFromUri($module->getUri());
		
		// access via controller?
		$controllerAccess = CacheHelper::getControllerAccess($controllerClassName);
		if (in_array($roleUri, $controllerAccess['module'])) {

		    // remove access to controller
		    ModuleAccessService::singleton()->remove($roleUri, $module->getUri());
		
		    // add access to all other actions
		    foreach (ModelHelper::getActions($module) as $action) {
		        if ($action->getUri() != $accessUri) {
		            $this->add($roleUri, $action->getUri());
                    $this->getEventManager()->trigger(new AccessRightAddedEvent($roleUri, $action->getUri()));
                }
		    }
		    
		} elseif (isset($controllerAccess['actions'][$act]) && in_array($roleUri, $controllerAccess['actions'][$act])) {
		    // remove action only
		    $role->removePropertyValues($actionAccessProperty, array('pattern' => $accessUri));
            $this->getEventManager()->trigger(new AccessRightRemovedEvent($roleUri, $accessUri));

            CacheHelper::flushControllerAccess($controllerClassName);
		}
    }
1252730
public function delete($customer, $roleAssignmentId, $optParams = array())
  {
    $params = array('customer' => $customer, 'roleAssignmentId' => $roleAssignmentId);
    $params = array_merge($params, $optParams);
    return $this->call('delete', array($params));
  }
874279
def delete_role(role_id)
      @roles.reject! { |r| r.id == role_id }
      @members.each do |_, member|
        new_roles = member.roles.reject { |r| r.id == role_id }
        member.update_roles(new_roles)
      end
      @channels.each do |channel|
        overwrites = channel.permission_overwrites.reject { |id, _| id == role_id }
        channel.update_overwrites(overwrites)
      end
    end
917174
public function removeRole($contentId, $roleId)
    {
        $query = $this->handler->createDeleteQuery();
        $query
            ->deleteFrom($this->handler->quoteTable('ezuser_role'))
            ->where(
                $query->expr->lAnd(
                    $query->expr->eq(
                        $this->handler->quoteColumn('contentobject_id'),
                        $query->bindValue($contentId, null, \PDO::PARAM_INT)
                    ),
                    $query->expr->eq(
                        $this->handler->quoteColumn('role_id'),
                        $query->bindValue($roleId, null, \PDO::PARAM_INT)
                    )
                )
            );
        $query->prepare()->execute();
    }
1053171
def user_remove(username,
                user=None,
                host=None,
                port=None,
                maintenance_db=None,
                password=None,
                runas=None):
    '''
    
    '''
    return _role_remove(username,
                        user=user,
                        host=host,
                        port=port,
                        maintenance_db=maintenance_db,
                        password=password,
                        runas=runas)
204799
def remove_role(*_, role_handle=None, user_id=None):
    
    click.echo(green('\nRemoving role from user:'))
    click.echo(green('-' * 40))
    with get_app().app_context():
        user = find_user(dict(id=user_id))
        if not user:
            click.echo(red('User not found\n'))
            return

        remove_role = None
        for role in user.roles:
            if role.handle == role_handle:
                remove_role = role

        if not remove_role:
            click.echo(red('User does not have such role\n'))
            return

        user_service.remove_role_from_user(user, remove_role)
        msg = 'Role "{}" removed from user "{}"\n'.format(
            remove_role.handle,
            user.email
        )
        click.echo(green(msg))
        return
438626
def role_delete(self, role_id, **kwargs):
        ""
        api_path = "/api/v2/roles/{role_id}"
        api_path = api_path.format(role_id=role_id)
        return self.call(api_path, method="DELETE", **kwargs)
722383
protected function addPermissionsToSU(Role $roleSu)
    {
        $this->stdout("Init SU assigning permissions\n",  Console::FG_YELLOW);
        foreach ($this->authManager->getPermissions() as $permission) {
            try {
                $this->authManager->addChild($roleSu, $permission);
                $this->stdout("\tAssign to SU permission: {$permission->name} - success\n", Console::FG_GREEN);
            } catch(\Exception $e) {
                $this->stdout("\t- already exist\n", Console::FG_RED);
            }
        };
    }
1083717
public function deleteCalendarObject($calendarId, $objectUri)
    {
        $stmt = $this->pdo->prepare('DELETE FROM simple_calendarobjects WHERE calendarid = ? AND uri = ?');
        $stmt->execute([$calendarId, $objectUri]);
    }
181091
public function deleteRole($roleId)
    {
        $this->roleService->deleteRole(
            $this->roleService->loadRole($roleId)
        );

        return new Values\NoContent();
    }
393212
def remove_role_from_user(self, user, role):
        
        rv = False
        user, role = self._prepare_role_modify_args(user, role)
        if role in user.roles:
            rv = True
            user.roles.remove(role)
            self.put(user)
        return rv
323872
public function removeRoleAssignmentById($roleAssignmentId)
    {
        try {
            return $this->innerGateway->removeRoleAssignmentById($roleAssignmentId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
399840
public function removeRole(ChildRole $role)
    {
        if ($this->getRoles()->contains($role)) { $userRole = new ChildUserRole();

            $userRole->setRole($role);
            if ($role->isUsersLoaded()) {
                //remove the back reference if available
                $role->getUsers()->removeObject($this);
            }

            $userRole->setUser($this);
            $this->removeUserRole(clone $userRole);
            $userRole->clear();

            $this->collRoles->remove($this->collRoles->search($role));

            if (null === $this->rolesScheduledForDeletion) {
                $this->rolesScheduledForDeletion = clone $this->collRoles;
                $this->rolesScheduledForDeletion->clear();
            }

            $this->rolesScheduledForDeletion->push($role);
        }


        return $this;
    }
1021549
public function remove(Role $role)
    {
        if ($role->isReadOnly()) {
            throw new RoleReadOnlyException('This role cannot be removed');
        }

        $this->om->remove($role);
        $this->om->flush();
    }
360889
public function removeRole($role)
    {
        if ($role instanceof Role) {
            $role = $role->id;
        }

        if (false !== ($index = array_search($role, $this->attributes['roles']))) {
            unset($this->attributes['roles'][$index]);
        }

        return true;
    }
681171
public function removeUser($userUri, core_kernel_classes_Resource $group) {
        $user = new \core_kernel_classes_Resource($userUri);
        return $user->removePropertyValue(new core_kernel_classes_Property(self::PROPERTY_MEMBERS_URI), $group);
    }
1074516
public function delete($uri, $parameters = array())
    {
        return $this->request(self::DELETE, $this->getUrl($uri), $parameters);
    }