normalizeAuthAdminRoles function

List<String> normalizeAuthAdminRoles(
  1. Iterable<String> roles
)

Normalizes auth admin roles.

Implementation

List<String> normalizeAuthAdminRoles(Iterable<String> roles) =>
    List<String>.unmodifiable(
      roles
          .map((role) => role.trim().toLowerCase())
          .where((role) => role.isNotEmpty)
          .toSet()
          .toList()
        ..sort(),
    );