1
0
mirror of https://github.com/amir20/dozzle.git synced 2026-01-03 19:45:01 +01:00

chore: adds all and throws warning if role does not exist

This commit is contained in:
Amir Raminfar
2025-09-21 16:43:19 -07:00
parent e75b4d03bc
commit 2b0c9124d7

View File

@@ -2,6 +2,8 @@ package auth
import (
"strings"
"github.com/rs/zerolog/log"
)
type Role int
@@ -32,6 +34,10 @@ func ParseRole(commaValues string) Role {
roles |= Download
case "none":
return None
case "all":
return All
default:
log.Warn().Str("role", role).Msg("invalid role")
}
}
return roles