summaryrefslogtreecommitdiffstats
path: root/model/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/user.go')
-rw-r--r--model/user.go5
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
}