diff --git a/internal/auth/auth.go b/internal/auth/auth.go index ea6c9f2..c4b0898 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -166,10 +166,10 @@ func GetValidRoles(user *User) ([]string, error) { return vals, fmt.Errorf("%s: only admins are allowed to fetch a list of roles", user.Username) } -// Called by routerConfig web.page setup in backend: Only requires known user and/or not API user +// Called by routerConfig web.page setup in backend: Only requires known user func GetValidRolesMap(user *User) (map[string]Role, error) { named := make(map[string]Role) - if user.HasNotRoles([]Role{RoleApi, RoleAnonymous}) { + if user.HasNotRoles([]Role{RoleAnonymous}) { for i := RoleApi; i < RoleError; i++ { named[GetRoleString(i)] = i }