Prevent system_admin role mistake (#4405)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
92642bab68
Коммит
aa6cb03b20
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user