@param RevokeRolesFromUser $command
@param Pbjx                $pbjx

@return UserRolesRevoked
321197
protected function createUserRolesRevoked(RevokeRolesFromUser $command, Pbjx $pbjx): UserRolesRevoked
    {
        /** @var UserRolesRevoked $event */
        $event = UserRolesRevokedV1Mixin::findOne()->createMessage();
        return $event;
    }
702465
public ServerUpdater removeRoleFromUser(User user, Role role) {
        delegate.removeRoleFromUser(user, role);
        return this;
    }
596008
protected function createAppRolesGranted(GrantRolesToApp $command, Pbjx $pbjx): AppRolesGranted
    {
        /** @var AppRolesGranted $event */
        $event = AppRolesGrantedV1Mixin::findOne()->createMessage();
        return $event;
    }
960836
public function revokeRootPrivileges()
    {
        if ($this->revokeRootStatement == null) {
            $this->revokeRootStatement =
                $this->connection->prepare("DELETE FROM UserPrivileges WHERE username = ? AND rootPrivileges = 1");
            $u = $this->user->getUsername();
            $this->revokeRootStatement->bindParam(1, $u);
        }
        $this->revokeRootStatement->execute();
        $this->rootPrivilege = false;
    }
53383
public function revokeToken($enterpriseId, $userId, $optParams = array())
  {
    $params = array('enterpriseId' => $enterpriseId, 'userId' => $userId);
    $params = array_merge($params, $optParams);
    return $this->call('revokeToken', array($params));
  }
50324
public function handle(CreateUserCommand $command)
    {
        $user = User::create([
            'username' => $command->username,
            'password' => $command->password,
            'email'    => $command->email,
            'level'    => $command->level,
        ]);

        event(new UserWasCreatedEvent($user));

        return $user;
    }
868929
public function revokeRole($role, $user_id)
    {
        $user = \App\User::findorfail($user_id);

        $user->removeRole(str_slug($role, ' '));

        return redirect('scaffold-users/edit/'.$user_id);
    }
1062116
function _revokedCertificate(&$rclist, $serial, $create = false)
    {
        $serial = new Math_BigInteger($serial);

        foreach ($rclist as $i => $rc) {
            if (!($serial->compare($rc['userCertificate']))) {
                return $i;
            }
        }

        if (!$create) {
            return false;
        }

        $i = count($rclist);
        $rclist[] = array('userCertificate' => $serial,
                          'revocationDate'  => $this->_timeField(@date('D, d M Y H:i:s O')));
        return $i;
    }
536352
public static function getUserAwareChoiceBuilder(FormBuilderInterface $builder, UserInterface $user = null)
    {
        return function (EntityRepository $objectRepository) use ($builder, $user) {
            return $objectRepository->createQueryBuilder('o')
                ->andWhere('o.user = :user')
                ->setParameter('user', $user ?: $builder->getAttribute('user_aware'))
            ;
        };
    }
367586
public function revokeRolePermission($role, $key, $rangeEnd = null)
    {
        $params = [
            'role' => $role,
            'key' => $key,
        ];
        if ($rangeEnd !== null) {
            $params['range_end'] = $rangeEnd;
        }

        $body = $this->request(self::URI_AUTH_ROLE_REVOKE, $params);

        return $body;
    }
785448
private void applyAce(final AccessControllable node, final Ace toAdd, final boolean revoke) throws FrameworkException {

		final String principalId       = toAdd.getPrincipalId();
		final List<String> permissions = toAdd.getPermissions();

		final Principal principal = CMISObjectWrapper.translateUsernameToPrincipal(principalId);
		if (principal != null) {

			for (final String permissionString : permissions) {

				final Permission permission = Permissions.valueOf(permissionString);
				if (permission != null) {

					if (revoke) {

						node.revoke(permission, principal);

					} else {

						node.grant(permission, principal);
					}

				} else {

					throw new CmisInvalidArgumentException("Permission with ID " + permissionString + " does not exist");
				}
			}

		} else {

			throw new CmisObjectNotFoundException("Principal with ID " + principalId + " does not exist");
		}




	}
916006
public function revoke($privilege, $username, $database = null)
    {
        return $this->executePrivilege('REVOKE', $privilege, $username, $database);
    }
633975
public function actionPermission($user, $operation, $permission)
    {
        $user = $this->getUser($user);
        $permission = Yii::$app->authManager->getPermission($permission);
        if ($operation == 'assign') {
            try {
                $assignment = Yii::$app->authManager->assign($permission, $user);
            } catch (\yii\db\IntegrityException $ex) {
                echo "Failed to assign `" . $permission->name . "`.\n";
                echo "Maybe the permission has been assigned.\n";
                return static::EXIT_CODE_ERROR;
            }
            if ($assignment) {
                echo "`$permission->name`" . " assigned to User (" . $user->getID() . ") successfully.\n";
            } else {
                echo "Failed to assign `" . $permission->name . "`.\n";
            }
            return static::EXIT_CODE_NORMAL;
        }
        if ($operation == 'revoke') {
            $assignment = Yii::$app->authManager->revoke($permission, $user);
            if ($assignment) {
                echo "`$permission->name`" . " revoked from User (" . $user->getID() . ").\n";
            } else {
                echo "Failed to revoke `" . $permission->name . "`.\n";
                echo "Maybe the permission has not been assigned yet.\n";
            }
            return static::EXIT_CODE_NORMAL;
        }
        echo "Unrecognized operation: $operation.\n";
        echo "The accepted operations are `assign` and `revoke`.\n";
        return static::EXIT_CODE_ERROR;
    }
595968
def _delLocalOwnerRole(self, username):
        
        parent = self.getParent()
        if parent.portal_type == "Client":
            parent.manage_delLocalRoles([username])
            # reindex object security
            self._recursive_reindex_object_security(parent)
1027524
public function revokeSitePrivileges()
    {
        if ($this->revokeSiteStatement == null) {
            $this->revokeSiteStatement =
                $this->connection->prepare("DELETE FROM UserPrivileges WHERE username = ? AND sitePrivileges = 1");
            $u = $this->user->getUsername();
            $this->revokeSiteStatement->bindParam(1, $u);
        }
        $this->revokeSiteStatement->execute();
        $this->sitePrivilege = 0;
    }
1276368
def delete_user(self, user):
        
        assert self.user == 'catroot' or self.user == 'postgres'
        assert not user == 'public'
        con = self.connection or self._connect()
        cur = con.cursor()
        cur.execute('DROP SCHEMA {user} CASCADE;'.format(user=user))
        cur.execute('REVOKE USAGE ON SCHEMA public FROM {user};'
                    .format(user=user))
        cur.execute(
            'REVOKE SELECT ON ALL TABLES IN SCHEMA public FROM {user};'
            .format(user=user))
        cur.execute(
            'DROP ROLE {user};'.format(user=user))
        self.stdout.write(
            'REMOVED USER {user}\n'.format(user=user))

        if self.connection is None:
            con.commit()
            con.close()

        return self
548934
public function revokeRole(Role $role): bool
    {
        return (new actions\RevokeRole($this->user, $role))->execute();
    }