How is the ServiceStack "AllRoles" collection determined?

Viewed 40

Trying to enable the ServiceStack Studio User Management utility to more easily manage the various users that access our APIs. It appears that to populate the roles dropdown, the User Management utility queries the following property:

[API_URL]/metadata/app.json -

{
   ...
   "allRoles":["Admin","Employee","Manager"]
   ...
}

But I don't see how ServiceStack determines the list of allRoles for a given IAuthRepository.

The only way I've been able to add a role to the allRoles collection is by adding a decoration to one of my database operations:

[ValidateHasRole("ZZZ")]

Are there other ways to inform an IAuthRepository of what roles to expect?

1 Answers
Related