1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

chore: quick clean up

This commit is contained in:
Amir Raminfar
2025-09-21 14:57:06 -07:00
parent 5f24657b41
commit e75b4d03bc
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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 {