OrganizationRoles lists all roles that can be applied to an organization user in the given organization. This is the list of available roles, and specific to an organization. This should be a list in a database, but until then we build the list from the builtins.
(organizationID uuid.UUID)
| 885 | // This should be a list in a database, but until then we build |
| 886 | // the list from the builtins. |
| 887 | func OrganizationRoles(organizationID uuid.UUID) []Role { |
| 888 | var roles []Role |
| 889 | for _, roleF := range builtInRoles { |
| 890 | role := roleF(organizationID) |
| 891 | if role.Identifier.OrganizationID == organizationID { |
| 892 | roles = append(roles, role) |
| 893 | } |
| 894 | } |
| 895 | return roles |
| 896 | } |
| 897 | |
| 898 | // SiteBuiltInRoles lists all roles that can be applied to a user. |
| 899 | // This is the list of available roles, and not specific to a user |
no outgoing calls