From e227c80806a31c3deaa3ef7d3cd80cc305de22ad Mon Sep 17 00:00:00 2001 From: Avisha Sodhi <38086281+SodhiA1@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:11:35 -0700 Subject: [PATCH] EGC-3: Create roles for GRAD reporting --- .../db/migration/V1.0.54__EDX_API.sql | 52 +++++++++++++++++++ tools/config/update-configmap.sh | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 api/src/main/resources/db/migration/V1.0.54__EDX_API.sql diff --git a/api/src/main/resources/db/migration/V1.0.54__EDX_API.sql b/api/src/main/resources/db/migration/V1.0.54__EDX_API.sql new file mode 100644 index 00000000..e9af461c --- /dev/null +++ b/api/src/main/resources/db/migration/V1.0.54__EDX_API.sql @@ -0,0 +1,52 @@ +INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('SCH_GRAD_RO', 'School GRAD Read-Only', 'GRAD read-only permission for School.', 'IDIR/AVSODHI', 'IDIR/AVSODHI'); + +INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('VIEW_SCH_GRAD_RPT', 'View School GRAD Reports', 'GRAD view reports permission for School.', 'IDIR/AVSODHI', 'IDIR/AVSODHI'); + +INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('DIS_GRAD_RO', 'District GRAD Read-Only', 'GRAD read-only permission for District.', 'IDIR/AVSODHI', 'IDIR/AVSODHI'); + +INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('VIEW_DIS_GRAD_RPT', 'View District GRAD Reports', 'GRAD view reports permission for District.', 'IDIR/AVSODHI', 'IDIR/AVSODHI'); + +INSERT INTO EDX_ROLE (EDX_ROLE_CODE, LABEL, IS_DISTRICT_ROLE, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('SCH_GRAD_RO', 'School GRAD Read-Only', FALSE, 'Read-only GRAD role for School.', 'IDIR/AVSODHI', 'IDIR/AVSODHI'); + +INSERT INTO EDX_ROLE (EDX_ROLE_CODE, LABEL, IS_DISTRICT_ROLE, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('DIS_GRAD_RO', 'District GRAD Read-Only', TRUE, 'Read-only GRAD role for District.', 'IDIR/AVSODHI', 'IDIR/AVSODHI'); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'SCH_GRAD_RO', 'SCH_GRAD_RO', 'IDIR/AVSODHI', + to_date('2024-10-01', 'YYYY-MM-DD'), 'IDIR/AVSODHI', to_date('2024-10-01', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'SCH_GRAD_RO', 'EDX_SCHOOL_VIEW', 'IDIR/AVSODHI', + to_date('2024-10-01', 'YYYY-MM-DD'), 'IDIR/AVSODHI', to_date('2024-10-01', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'SCH_GRAD_RO', 'VIEW_SCH_GRAD_RPT', 'IDIR/AVSODHI', + to_date('2024-10-01', 'YYYY-MM-DD'), 'IDIR/AVSODHI', to_date('2024-10-01', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_GRAD_RO', 'DIS_GRAD_RO', 'IDIR/AVSODHI', + to_date('2024-10-01', 'YYYY-MM-DD'), 'IDIR/AVSODHI', to_date('2024-10-01', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_GRAD_RO', 'EDX_SCHOOL_VIEW', 'IDIR/AVSODHI', + to_date('2024-10-01', 'YYYY-MM-DD'), 'IDIR/AVSODHI', to_date('2024-10-01', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_GRAD_RO', 'EDX_DISTRICT_VIEW', 'IDIR/AVSODHI', + to_date('2024-10-01', 'YYYY-MM-DD'), 'IDIR/AVSODHI', to_date('2024-10-01', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_GRAD_RO', 'VIEW_DIS_GRAD_RPT', 'IDIR/AVSODHI', + to_date('2024-10-01', 'YYYY-MM-DD'), 'IDIR/AVSODHI', to_date('2024-10-01', 'YYYY-MM-DD')); \ No newline at end of file diff --git a/tools/config/update-configmap.sh b/tools/config/update-configmap.sh index 30aa6c40..2a44d4dd 100644 --- a/tools/config/update-configmap.sh +++ b/tools/config/update-configmap.sh @@ -412,7 +412,7 @@ EMAIL_TEMPLATE_EDX_SCHOOL_PRIMARY_CODE_NOTIFICATION_LITERAL="Primary Activation Code

Hi ,

Here is the EDX Primary Activation Code for - :

Once you have activated your EDX District Account Manager account, you will be able to grant access to others. You will find your district’s Primary Activation Code from your dashboard by clicking Menu, Administration, District User Management.


The EDX Team
Ministry of Education and Child Care
educationdataexchange@gov.bc.ca" -ROLES_ALLOW_LIST="EDX_DISTRICT_ADMIN,EDX_SCHOOL_ADMIN,STUDENT_DATA_COLLECTION,SECURE_EXCHANGE_SCHOOL,SECURE_EXCHANGE_DISTRICT,EDX_EDIT_SCHOOL,EDX_EDIT_DISTRICT,SCHOOL_SDC,DISTRICT_SDC,SUPERINT,SECR_TRES,DIS_SDC_RO,SCH_SDC_RO" +ROLES_ALLOW_LIST="EDX_DISTRICT_ADMIN,EDX_SCHOOL_ADMIN,STUDENT_DATA_COLLECTION,SECURE_EXCHANGE_SCHOOL,SECURE_EXCHANGE_DISTRICT,EDX_EDIT_SCHOOL,EDX_EDIT_DISTRICT,SCHOOL_SDC,DISTRICT_SDC,SUPERINT,SECR_TRES,DIS_SDC_RO,SCH_SDC_RO,SCH_GRAD_RO,DIS_GRAD_RO" if [ "$envValue" = "prod" ] then