fix for one of the failing tests (acl for tables added)

This commit is contained in:
Ruslan Talpa
2015-09-22 18:17:24 +03:00
parent a7b883c922
commit 6f55e1d389
6 changed files with 64 additions and 10 deletions
+14
View File
@@ -311,3 +311,17 @@ allprimaryKeys = do
AND kc.table_schema NOT IN ('pg_catalog', 'information_schema')
|]
return $ map pkFromRow pks
alltablesAcl :: H.Tx P.Postgres s [(Text, Text, Text)]
alltablesAcl = do
acl <- H.listEx $ [H.stmt|
SELECT
table_schema,
table_name,
grantee as role
FROM information_schema.role_table_grants
WHERE
table_schema NOT IN ('pg_catalog', 'information_schema') AND
privilege_type = 'SELECT'
|]
return acl