For now, this is almost identical to the campsite types, but this section is for purely informational pages that have no other relation to the database than “belongs to the same company”. Part of #33.
20 lines
676 B
PL/PgSQL
20 lines
676 B
PL/PgSQL
-- Verify camper:page on pg
|
|
|
|
begin;
|
|
|
|
select page_id
|
|
, company_id
|
|
, slug
|
|
, title
|
|
, content
|
|
from camper.page
|
|
where false;
|
|
|
|
select 1 / count(*) from pg_class where oid = 'camper.page'::regclass and relrowsecurity;
|
|
select 1 / count(*) from pg_policy where polname = 'guest_ok' and polrelid = 'camper.page'::regclass;
|
|
select 1 / count(*) from pg_policy where polname = 'insert_to_company' and polrelid = 'camper.page'::regclass;
|
|
select 1 / count(*) from pg_policy where polname = 'update_company' and polrelid = 'camper.page'::regclass;
|
|
select 1 / count(*) from pg_policy where polname = 'delete_from_company' and polrelid = 'camper.page'::regclass;
|
|
|
|
rollback;
|