Include CREATEROLE to the list of allowed flags. (#365)

Previously it has been supported by the operator, but the validity check
excluded it for no reason.
This commit is contained in:
Oleksii Kliukin 2018-08-08 10:53:08 +02:00 committed by GitHub
parent 14050588ee
commit acf46bfa62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,8 @@ func (c *Cluster) isSystemUsername(username string) bool {
func isValidFlag(flag string) bool {
for _, validFlag := range []string{constants.RoleFlagSuperuser, constants.RoleFlagLogin, constants.RoleFlagCreateDB,
constants.RoleFlagInherit, constants.RoleFlagReplication, constants.RoleFlagByPassRLS} {
constants.RoleFlagInherit, constants.RoleFlagReplication, constants.RoleFlagByPassRLS,
constants.RoleFlagCreateRole} {
if flag == validFlag || flag == "NO"+validFlag {
return true
}