diff options
Diffstat (limited to 'model/user.go')
-rw-r--r-- | model/user.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/model/user.go b/model/user.go index 1e1d49f7d..d915307ad 100644 --- a/model/user.go +++ b/model/user.go @@ -428,7 +428,7 @@ func IsValidUserRoles(userRoles string) bool { roles := strings.Fields(userRoles) for _, r := range roles { - if !isValidRole(r) { + if !IsValidRoleName(r) { return false } } @@ -441,11 +441,6 @@ func IsValidUserRoles(userRoles string) bool { return true } -func isValidRole(roleId string) bool { - _, ok := DefaultRoles[roleId] - return ok -} - // Make sure you acually want to use this function. In context.go there are functions to check permissions // This function should not be used to check permissions. func (u *User) IsInRole(inRole string) bool { |