ACL: Add RoleStrings type to specify role names
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
1dee168e52
commit
8593da5b78
1 changed files with 4 additions and 1 deletions
|
@ -8,8 +8,11 @@ const (
|
|||
RoleUnknown Role = ""
|
||||
)
|
||||
|
||||
// RoleStrings represents user role names mapped to roles.
|
||||
type RoleStrings = map[string]Role
|
||||
|
||||
// ValidRoles specifies the valid user roles.
|
||||
var ValidRoles = map[string]Role{
|
||||
var ValidRoles = RoleStrings{
|
||||
string(RoleAdmin): RoleAdmin,
|
||||
string(RoleVisitor): RoleVisitor,
|
||||
string(RoleUnknown): RoleUnknown,
|
||||
|
|
Loading…
Reference in a new issue