getRolesForUser method

List<String> getRolesForUser(
  1. String name
)

getRolesForUser gets the roles that a user has.

name the user. return the roles that the user has.

Implementation

List<String> getRolesForUser(String name) {
  try {
    return model.model['g']!['g']!.rm.getRoles(name);
  } catch (e) {
    if (e.toString() == 'Null check operator used on a null value') {
      throw FormatException("model does not contain 'g' section");
    } else {
      rethrow;
    }
  }
}