INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION_GROUP (KEY_CAMPUS, KEY_ADMINISTRATIVE_OFFICE, KEY_ROOT_DOMAIN_OBJECT) VALUES (2177, 2, 1), (2178, 2, 1), (2177, 1, 1);

INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("MANAGE_CONCLUSION", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3978), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 1272), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 4280), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("MANAGE_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3978), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 1272), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 1268), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 2339), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 2675), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 2232), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 4065), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 4280), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("RECTIFICATION_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3978), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 1272), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 1268), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 2675), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("DISSERTATION_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3978), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 1272), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 1268), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("UPDATE_REGISTRATION_AFTER_CONCLUSION", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3978), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.UpdateRegistrationAfterConclusionPermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("ENROLMENT_WITHOUT_RULES", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3978), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');

INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("MANAGE_CONCLUSION", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3703), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3068), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 2973), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 1), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("MANAGE_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3703), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3068), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 2973), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3890), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 1), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("RECTIFICATION_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3703), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3068), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 2973), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 1), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("UPDATE_REGISTRATION_AFTER_CONCLUSION", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3703), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 1), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.UpdateRegistrationAfterConclusionPermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("ENROLMENT_WITHOUT_RULES", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3703), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2177 AND KEY_ADMINISTRATIVE_OFFICE = 1), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');

INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("MANAGE_CONCLUSION", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3821), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2178 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("MANAGE_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3821), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3303), ", ", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3896), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2178 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("RECTIFICATION_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3821), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2178 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("DISSERTATION_MARKSHEETS", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3821), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2178 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("UPDATE_REGISTRATION_AFTER_CONCLUSION", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3821), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2178 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.UpdateRegistrationAfterConclusionPermission');
INSERT INTO ADMINISTRATIVE_OFFICE_PERMISSION (PERMISSION_TYPE, KEY_ROOT_DOMAIN_OBJECT, PERMISSION_MEMBERS_GROUP, KEY_ADMINISTRATIVE_OFFICE_PERMISSION_GROUP, OJB_CONCRETE_CLASS) VALUES ("ENROLMENT_WITHOUT_RULES", 1, CONCAT("fixed(", (SELECT EMPLOYEE.KEY_PERSON FROM EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_NUMBER = 3821), ")"), (SELECT ADMINISTRATIVE_OFFICE_PERMISSION_GROUP.ID_INTERNAL FROM ADMINISTRATIVE_OFFICE_PERMISSION_GROUP WHERE KEY_CAMPUS = 2178 AND KEY_ADMINISTRATIVE_OFFICE = 2), 'net.sourceforge.fenixedu.domain.accessControl.academicAdminOffice.GenericAdministrativeOfficePermission');
