Skip to content

Commit

Permalink
EDX-2382: added EDX_SCHOOL_VIEW and EDX_DISTRICT_VIEW permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
keeganbcgov committed Apr 2, 2024
1 parent f67c10c commit 3273ee4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/src/main/resources/db/migration/V1.0.43__EDX_API.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER)
VALUES ('EDX_SCHOOL_VIEW', 'EDX School View', 'Permission to view school details and contacts.', 'IDIR/KLAUR', 'IDIR/KLAUR');

INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER)
VALUES ('EDX_DISTRICT_VIEW', 'EDX District View', 'Permission to view district details and contacts.', 'IDIR/KLAUR', 'IDIR/KLAUR');

INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, UPDATE_USER)
SELECT gen_random_uuid(), edx_role_code, 'EDX_SCHOOL_VIEW', 'IDIR/KLAUR', 'IDIR/KLAUR' FROM EDX_ROLE;

INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, UPDATE_USER)
SELECT gen_random_uuid(), edx_role_code, 'EDX_DISTRICT_VIEW', 'IDIR/KLAUR', 'IDIR/KLAUR' FROM EDX_ROLE WHERE IS_DISTRICT_ROLE=1;

0 comments on commit 3273ee4

Please sign in to comment.