Remove role label array from frontend

- made centralized role array uncentralized again
This commit is contained in:
Christoph Kluge
2023-02-01 14:49:10 +01:00
parent 7fb94c33cf
commit a2ebebd7f6
3 changed files with 4 additions and 18 deletions

View File

@@ -143,7 +143,7 @@ func IsValidRole(role string) bool {
func GetValidRoles(user *User) ([5]string, error) {
var vals [5]string
if (!user.HasRole(RoleAdmin)) {
return vals, fmt.Errorf("%#v: only admins are allowed to fetch a list of roles", user.Username)
return vals, fmt.Errorf("%s: only admins are allowed to fetch a list of roles", user.Username)
} else {
return validRoles, nil
}