Skip to content

Commit 09def71

Browse files
cleanup
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
1 parent 7cf3124 commit 09def71

6 files changed

Lines changed: 2940 additions & 3004 deletions

File tree

fga/model/helpers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ func OrganizationRoles() ([]modelparse.OrganizationRole, error) {
339339
return roles, nil
340340
}
341341

342+
// FilterOrganizationRoles ensures the assigned role is an organizational role and returns
343+
// a filtered list of OrganizationRoles
342344
func FilterOrganizationRoles(roles []modelparse.OrganizationRole, assigned []string) []modelparse.OrganizationRole {
343345
filtered := make([]modelparse.OrganizationRole, 0, len(assigned))
344346
for _, role := range roles {
@@ -350,6 +352,7 @@ func FilterOrganizationRoles(roles []modelparse.OrganizationRole, assigned []str
350352
return filtered
351353
}
352354

355+
// GetOrganizationRoleStrings takes assigned roles and filters non organization roles and returns a string list of role names
353356
func GetOrganizationRoleStrings(roles []modelparse.OrganizationRole, assigned []string) []string {
354357
filtered := make([]string, 0, len(assigned))
355358
for _, role := range roles {

0 commit comments

Comments
 (0)