diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/user.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/model/user.go b/model/user.go index f5edf302f..330d26d82 100644 --- a/model/user.go +++ b/model/user.go @@ -337,6 +337,11 @@ func IsValidUserRoles(userRoles string) bool { } } + // Exclude just the system_admin role explicitly to prevent mistakes + if len(roles) == 1 && roles[0] == "system_admin" { + return false + } + return true } |