-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: removing certifier policy on application_revision table
- Loading branch information
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Deploy ggircs-portal:policies/application_revision_policies_001 to pg | ||
-- requires: policies/application_revision_policies | ||
|
||
BEGIN; | ||
|
||
drop policy certifier_select_application_revision on ggircs_portal.application_revision; | ||
|
||
COMMIT; |
18 changes: 18 additions & 0 deletions
18
schema/revert/policies/application_revision_policies_001.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- Revert ggircs-portal:policies/application_revision_policies_001 from pg | ||
|
||
BEGIN; | ||
|
||
do | ||
$policy$ | ||
declare certifier_user_statement text; | ||
begin | ||
|
||
certifier_user_statement := 'application_id in (select ggircs_portal_private.get_valid_applications_for_certifier())'; | ||
|
||
-- ciip_industry_user (certifier) RLS | ||
perform ggircs_portal_private.upsert_policy('certifier_select_application_revision', 'application_revision', 'select', 'ciip_industry_user', certifier_user_statement); | ||
|
||
end | ||
$policy$; | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Verify ggircs-portal:policies/application_revision_policies_001 on pg | ||
|
||
BEGIN; | ||
|
||
select ggircs_portal_private.verify_policy_not_present('certifier_select_application_revision', 'ggircs_portal.application_revision'); | ||
|
||
ROLLBACK; |