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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user