-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
95bc62f
commit e744380
Showing
1 changed file
with
25 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,25 @@ | ||
-- Delete any role assignments to the CLIENT initial testing roles | ||
DELETE FROM app_fam.fam_user_role_xref WHERE role_id IN | ||
(SELECT role_id from app_fam.fam_role WHERE application_id IN | ||
(SELECT application_id FROM app_fam.fam_application WHERE application_name IN ('CLIENT_DEV', 'CLIENT_TEST', 'CLIENT_PROD')) | ||
) | ||
; | ||
|
||
-- Delete previously created CLIENT testing roles for client_dev, client_test and client_prod applications | ||
DELETE FROM app_fam.fam_role WHERE application_id IN ( | ||
SELECT application_id FROM app_fam.fam_application WHERE application_name IN ('CLIENT_DEV', 'CLIENT_TEST', 'CLIENT_PROD') | ||
); | ||
|
||
-- Add a role for CLIENT_DEV, CLIENT_TEST and CLIENT_PROD | ||
INSERT INTO app_fam.fam_role ( | ||
role_name, | ||
role_purpose, | ||
application_id, | ||
role_type_code, | ||
create_user, | ||
create_date | ||
) | ||
VALUES ('CLIENT_EDITOR', 'Ministry role to approve/reject submissions, create client records, and perform non-administrative edits to client records', (select application_id from app_fam.fam_application where application_name = 'CLIENT_DEV'), 'C', CURRENT_USER, CURRENT_DATE), | ||
('CLIENT_EDITOR', 'Ministry role to approve/reject submissions, create client records, and perform non-administrative edits to client records', (select application_id from app_fam.fam_application where application_name = 'CLIENT_TEST'), 'C', CURRENT_USER, CURRENT_DATE), | ||
('CLIENT_EDITOR', 'Ministry role to approve/reject submissions, create client records, and perform non-administrative edits to client records', (select application_id from app_fam.fam_application where application_name = 'CLIENT_PROD'), 'C', CURRENT_USER, CURRENT_DATE) | ||
; |