Deletes a role assignment.

 @param role_id [String] The ID of the role assignment to delete.
 @param custom_headers [Hash{String => String}] A hash of custom headers that
 will be added to the HTTP request.

 @return [RoleAssignment] operation results.
350728
def delete_by_id(role_id, custom_headers:nil)
      response = delete_by_id_async(role_id, custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
155215
public function delete($account_id, $custom_tab_id)
    {
        list($response) = $this->deleteWithHttpInfo($account_id, $custom_tab_id);
        return $response;
    }
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);
        }
    }
762534
public static void deleteRole(DbConn cnx, int id, boolean force)
    {
        if (force)
        {
            cnx.runUpdate("user_remove_role", id);
        }
        else
        {
            int userUsingRole = cnx.runSelectSingle("user_select_count_using_role", Integer.class, id);
            if (userUsingRole > 0)
            {
                cnx.setRollbackOnly();
                throw new JqmAdminApiUserException(
                        "cannot delete a role currently attributed to a user. Remove role attribution of use force parameter.");
            }
        }

        QueryResult qr = cnx.runUpdate("role_delete_by_id", id);
        if (qr.nbUpdated != 1)
        {
            cnx.setRollbackOnly();
            throw new JqmAdminApiUserException("no item with ID " + id);
        }
    }
1093747
def delete_role_config_group(self, name):
    
    return role_config_groups.delete_role_config_group(
        self._get_resource_root(), self.name, name, self._get_cluster_name())
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
1069175
public function removeRole($id, $role)
    {
        $user = $this->getUser($id);

        if (empty($user) || empty($role)) {
            return false;
        }

        // Remove the role from the $user['roles'] array.
        $user['roles'] = array_diff($user['roles'], [(string) $role]);

        return $this->saveUser($user);
    }
885238
def remove_role_from_user(self, user, role):
        
        user.remove_role(role)
        self.save(user)
        events.user_lost_role_event.send(user, role=role)
1334207
@DELETE
  @Path("me")
  @RolesAllowed({"ROLE_ADMIN", "ROLE_USER"})
  public Response delete(@Context HttpServletRequest request) {
    Long userId = (Long) request.getAttribute(OAuth2Filter.NAME_USER_ID);
    return delete(userId);
  }
1260450
public Request<Role> update(String roleId, Role role) {
    Asserts.assertNotNull(roleId, "role id");
    Asserts.assertNotNull(role, "role");

    String url = baseUrl
        .newBuilder()
        .addEncodedPathSegments("api/v2/roles")
        .addEncodedPathSegments(roleId)
        .build()
        .toString();
    CustomRequest<Role> request = new CustomRequest<>(this.client, url, "PATCH", new TypeReference<Role>() {});
    request.addHeader("Authorization", "Bearer " + apiToken);
    request.setBody(role);
    return request;
  }
377985
public function remove(Role $role)
    {
        $role->delete();

        Alert::info(__('Role was removed'));

        return redirect()->route('platform.systems.roles');
    }
860173
public function removeRoleAssignmentById($roleAssignmentId)
    {
        $query = $this->handler->createDeleteQuery();
        $query
            ->deleteFrom($this->handler->quoteTable('ezuser_role'))
            ->where(
                $query->expr->eq(
                    $this->handler->quoteColumn('id'),
                    $query->bindValue($roleAssignmentId, null, \PDO::PARAM_INT)
                )
            );
        $query->prepare()->execute();
    }
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();
    }
719652
def remove_role(project_root)
      # Choose a role from the availables
      roles = Bebox::Role.list(project_root)
      # Get a role if exist.
      if roles.count > 0
        role_name = choose_option(roles, _('wizard.role.choose_deletion_role'))
      else
        return error _('wizard.role.no_deletion_roles')
      end
      # Ask for deletion confirmation
      return warn(_('wizard.no_changes')) unless confirm_action?(_('wizard.role.confirm_deletion'))
      # Role deletion
      role = Bebox::Role.new(role_name, project_root)
      output = role.remove
      ok _('wizard.role.deletion_success')
      return output
    end
73463
@Override
	public void deleteRole(String rolename) throws RolesException {
		if (role_list.containsKey(rolename)) {
			List<String> users_with_role = role_list.get(rolename);
			for (String user : users_with_role) {
				// Remove the role from this user
				List<String> roles_of_user = user_list.get(user);
				roles_of_user.remove(rolename);
				user_list.put(user, roles_of_user);

				// Update our file_store
				String roles = StringUtils.join(roles_of_user.toArray(new String[0]), ",");
				file_store.setProperty(user, roles);
			}
			// Remove the role entry
			role_list.remove(rolename);

			// And commit the file_store to disk
			try {
				saveRoles();
			} catch (IOException e) {
				throw new RolesException(e);
			}
		} else {
			throw new RolesException("Cannot find role '" + rolename + "'!");
		}
	}
1255076
def remove_role_from_user(self, user, role):
        
        user, role = self._prepare_role_modify_args(user, role)
        result = self.UserRole.select().where(
            self.UserRole.user == user,
            self.UserRole.role == role,
        )
        if result.count():
            query = self.UserRole.delete().where(
                self.UserRole.user == user, self.UserRole.role == role)
            query.execute()
            return True
        else:
            return False
518201
public synchronized Object removeRoleMapping(final String roleName) {
        /*
         * Would not expect this to happen during boot so don't offer the 'immediate' optimisation.
         */
        HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
        if (newRoles.containsKey(roleName)) {
            RoleMappingImpl removed = newRoles.remove(roleName);
            Object removalKey = new Object();
            removedRoles.put(removalKey, removed);
            roleMappings = Collections.unmodifiableMap(newRoles);

            return removalKey;
        }

        return null;
    }