Feature/validate role options (#101)

Be more rigorous about validating user flags.

Only accept CREATE ROLE flags that doesn't have any params (i.e.
not ADMIN or CONNECTION LIMIT). Check that both flag and NOflag
are not used at the same time.
This commit is contained in:
Oleksii Kliukin
2017-09-15 13:57:48 +02:00
committed by GitHub
parent 969a06f521
commit 7667847bfe
2 changed files with 31 additions and 8 deletions
+2
View File
@@ -12,4 +12,6 @@ const (
RoleFlagNoLogin = "NOLOGIN"
RoleFlagCreateRole = "CREATEROLE"
RoleFlagCreateDB = "CREATEDB"
RoleFlagReplication = "REPLICATION"
RoleFlagByPassRLS = "BYPASSRLS"
)