updateUserRole (query) {
    const { userId, roleId, newRoleState } = query;

    return new Promise((resolve, reject) => {
      fetch(`/api/user/${userId}/assignment`, {
        method: 'POST',
        headers: setReqHeaders({ 'Content-Type': 'application/json' }),
        body: JSON.stringify({ roleId, newRoleState })
      }).then((response) => {
        return response.json();
      }).then((response) => {
        if (!response.success) {
          return reject(response);
        }
        return resolve(response);
      }).catch((error) => {
        reject(error);
      });
    });
  }
Sets whether a user has a certain role
@param {Object} query - The query to update a user's role
                        {userId:"user123",roleId:"role:something",newRoleState:true}