Fixed RESQL test cases, regression of RLS policy.

pull/33/head
Akshay Joshi 2020-06-15 17:10:25 +05:30
parent eb1b17b636
commit a21e6448ce
7 changed files with 14 additions and 19 deletions

View File

@ -1,10 +1,9 @@
-- POLICY: policy_1 ON public.test_rls_policy
-- POLICY: policy_1 ON public.test_emp_rule
-- DROP POLICY policy_1 ON public.test_emp_rule;
-- DROP POLICY policy_1 ON public.test_rls_policy;
CREATE POLICY policy_1
ON public.test_emp_rule
ON public.test_rls_policy
FOR ALL
TO public
;

View File

@ -1,2 +1,2 @@
ALTER POLICY test ON public.test_emp_rule
ALTER POLICY test ON public.test_rls_policy
RENAME TO policy_1;

View File

@ -1,10 +1,9 @@
-- POLICY: insert_policy ON public.test_rls_policy
-- POLICY: insert_policy ON public.test_emp_rule
-- DROP POLICY insert_policy ON public.test_emp_rule;
-- DROP POLICY insert_policy ON public.test_rls_policy;
CREATE POLICY insert_policy
ON public.test_emp_rule
ON public.test_rls_policy
FOR INSERT
TO public
;

View File

@ -1,10 +1,9 @@
-- POLICY: test ON public.test_rls_policy
-- POLICY: test ON public.test_emp_rule
-- DROP POLICY test ON public.test_emp_rule;
-- DROP POLICY test ON public.test_rls_policy;
CREATE POLICY test
ON public.test_emp_rule
ON public.test_rls_policy
FOR ALL
TO public
;

View File

@ -1,10 +1,9 @@
-- POLICY: select_policy ON public.test_rls_policy
-- POLICY: select_policy ON public.test_emp_rule
-- DROP POLICY select_policy ON public.test_emp_rule;
-- DROP POLICY select_policy ON public.test_rls_policy;
CREATE POLICY select_policy
ON public.test_emp_rule
ON public.test_rls_policy
FOR SELECT
TO public
;

View File

@ -6,7 +6,7 @@
"endpoint": "NODE-table.obj",
"sql_endpoint": "NODE-table.sql_id",
"data": {
"name": "test_emp_rule",
"name": "test_rls_policy",
"columns": [
{
"name": "emp_id",

View File

@ -1,5 +1,4 @@
{# CREATE POLICY Statement #}
-- POLICY: {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.table) }}
-- DROP POLICY {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.table) }};