mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 19:34:14 +02:00
let isSystemUsername check all system users (#2489)
* let isSystemUsername check all system users * extend robot user unit test * reset system users for initSystemUser test
This commit is contained in:
+8
-1
@@ -78,7 +78,14 @@ func (c *Cluster) isProtectedUsername(username string) bool {
|
||||
}
|
||||
|
||||
func (c *Cluster) isSystemUsername(username string) bool {
|
||||
return (username == c.OpConfig.SuperUsername || username == c.OpConfig.ReplicationUsername)
|
||||
// is there a pooler system user defined
|
||||
for _, systemUser := range c.systemUsers {
|
||||
if username == systemUser.Name {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func isValidFlag(flag string) bool {
|
||||
|
||||
Reference in New Issue
Block a user