updateScopes method

Future<bool> updateScopes(
  1. Session session,
  2. Set<Scope> newScopes
)

Updates the scopes for a user, returns true if successful.

Implementation

Future<bool> updateScopes(Session session, Set<Scope> newScopes) async {
  if (id == null) return false;

  var updatedUser = await Users.updateUserScopes(session, id!, newScopes);
  if (updatedUser == null) return false;

  scopeNames = updatedUser.scopeNames;
  return true;
}