Adds dbrole filter back to root path querying the database

This commit is contained in:
Diogo Biazus
2015-10-16 15:55:56 -04:00
parent 3add3f5b6c
commit 275002e25d
+2 -1
View File
@@ -62,7 +62,8 @@ app dbstructure conf reqBody req =
case (path, verb) of
([], _) -> do
let body = encode $ filter ((cs schema==).tableSchema) allTabs
Identity (dbrole :: Text) <- H.singleEx $ [H.stmt|SELECT current_user|]
let body = encode $ filter (filterTableAcl dbrole) $ filter ((cs schema==).tableSchema) allTabs
return $ responseLBS status200 [jsonH] $ cs body
([table], "OPTIONS") -> do