Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAS Administration permissions. EAC-11 #343

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions api/src/main/resources/db/migration/V1.0.59__EDX_API.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
INSERT INTO EDX_ROLE (EDX_ROLE_CODE, LABEL, IS_DISTRICT_ROLE, DESCRIPTION, CREATE_USER, UPDATE_USER)
VALUES ('EAS_SCH_ADMIN', 'Assessment Administrator', FALSE, 'Assessment Administrator.', 'IDIR/STHIRUMA', 'IDIR/STHIRUMA');

INSERT INTO EDX_ROLE (EDX_ROLE_CODE, LABEL, IS_DISTRICT_ROLE, DESCRIPTION, CREATE_USER, UPDATE_USER)
VALUES ('EAS_DIS_ADMIN', 'Assessment Administrator', TRUE, 'Assessment Administrator.', 'IDIR/STHIRUMA', 'IDIR/STHIRUMA');


INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER)
VALUES ('EAS_SCH_EDIT', 'EAS School Edit', 'EAS edit permission for School.', 'IDIR/STHIRUMA', 'IDIR/STHIRUMA');

INSERT INTO EDX_PERMISSION (EDX_PERMISSION_CODE, LABEL, DESCRIPTION, CREATE_USER, UPDATE_USER)
VALUES ('EAS_DIS_EDIT', 'EAS District Edit', 'EAS edit permission for District.', 'IDIR/STHIRUMA', 'IDIR/STHIRUMA');


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(), 'EAS_SCH_ADMIN', 'EAS_SCH_EDIT', 'IDIR/STHIRUMA',
to_date('2024-11-08', 'YYYY-MM-DD'), 'IDIR/STHIRUMA', to_date('2024-11-08', '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(), 'EAS_SCH_ADMIN', 'EDX_SCHOOL_VIEW', 'IDIR/STHIRUMA',
to_date('2024-11-08', 'YYYY-MM-DD'), 'IDIR/STHIRUMA', to_date('2024-11-08', '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(), 'EAS_DIS_ADMIN', 'EAS_DIS_EDIT', 'IDIR/STHIRUMA',
to_date('2024-11-08', 'YYYY-MM-DD'), 'IDIR/STHIRUMA', to_date('2024-11-08', '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(), 'EAS_DIS_ADMIN', 'EDX_SCHOOL_VIEW', 'IDIR/STHIRUMA',
to_date('2024-11-08', 'YYYY-MM-DD'), 'IDIR/STHIRUMA', to_date('2024-11-08', '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(), 'EAS_DIS_ADMIN', 'EDX_DISTRICT_VIEW', 'IDIR/STHIRUMA',
to_date('2024-11-08', 'YYYY-MM-DD'), 'IDIR/STHIRUMA', to_date('2024-11-08', 'YYYY-MM-DD'));
2 changes: 1 addition & 1 deletion tools/config/update-configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ EMAIL_TEMPLATE_EDX_SCHOOL_PRIMARY_CODE_NOTIFICATION_LITERAL="<!DOCTYPE html><htm

EMAIL_TEMPLATE_EDX_DISTRICT_PRIMARY_CODE_NOTIFICATION_LITERAL="<!DOCTYPE html><html xmlns:th=\"http://www.thymeleaf.org\"><head><meta charset=\"ISO-8859-1\"><title>Primary Activation Code</title></head><body><p>Hi <span th:text=\"\${\$}{recipient}\"></span>,</p><p>Here is the EDX Primary Activation Code for <span th:text=\"\${\$}{minCode}\"></span> - <span th:text=\"\${\$}{instituteName}\"></span>: <span th:text=\"\${\$}{primaryCode}\"></span></p><p>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.</p><br><b>The EDX Team</b><br>Ministry of Education and Child Care<br>[email protected]</body></html>"

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,GRAD_SCH_ADMIN,GRAD_DIS_ADMIN"
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,GRAD_SCH_ADMIN,GRAD_DIS_ADMIN,EAS_SCH_ADMIN,EAS_DIS_ADMIN"

if [ "$envValue" = "prod" ]
then
Expand Down
Loading