diff --git a/internal/auth/roles.go b/internal/auth/roles.go index 92c19913..16fe04fd 100644 --- a/internal/auth/roles.go +++ b/internal/auth/roles.go @@ -7,17 +7,17 @@ import ( type Role int const ( - NONE Role = 0 + None Role = 0 Shell Role = 1 << iota Actions Download ) -const AllRole = Shell | Actions | Download +const All = Shell | Actions | Download func ParseRole(commaValues string) Role { if commaValues == "" { - return AllRole + return All } var roles Role @@ -31,7 +31,7 @@ func ParseRole(commaValues string) Role { case "download": roles |= Download case "none": - return NONE + return None } } return roles diff --git a/internal/auth/users.go b/internal/auth/users.go index e3ed1f28..43c742c2 100644 --- a/internal/auth/users.go +++ b/internal/auth/users.go @@ -201,7 +201,7 @@ func UserFromContext(ctx context.Context) *User { email := claims["email"].(string) name := claims["name"].(string) containerFilter := container.ContainerLabels{} - roles := AllRole + roles := All if filter, ok := claims["filter"].(string); ok { containerFilter, err = container.ParseContainerFilter(filter) if err != nil {