From 55943cacbfba53a9bdb07e2df75e25ec9003ca7d Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Mon, 17 Jul 2023 12:19:49 +0200 Subject: [PATCH] Fix frontend render for users with api role --- internal/auth/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }