From d904f5d734151ed80351d4aeb88d03a1855d6310 Mon Sep 17 00:00:00 2001 From: Samridhi Agrawal Date: Tue, 17 Jan 2023 12:05:21 +0530 Subject: [PATCH 1/2] BAH-1418 | Madhuri,Samridhi | Add. Appointment and OT module for superman user --- openmrs/migrations/liquibase.xml | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/openmrs/migrations/liquibase.xml b/openmrs/migrations/liquibase.xml index ffefbfce7..0488d27ef 100644 --- a/openmrs/migrations/liquibase.xml +++ b/openmrs/migrations/liquibase.xml @@ -85,6 +85,61 @@ INSERT INTO location_tag_map(location_id, location_tag_id) VALUES(@location_id, @location_tag_id); + + + + SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'OT: FullAccess'; + + + Add OT role for superman user + + INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'OT: FullAccess'); + + + + + + SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'OT: ReadOnly'; + + + Add OT role to superman + + INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'OT: ReadOnly'); + + + + + + SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'Appointments:FullAccess'; + + + Add Appointment FullAccess role to superman + + INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'Appointments:FullAccess'); + + + + + + SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'Appointments:ReadOnly'; + + + Add Appointment ReadOnly role to superman + + INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'Appointments:ReadOnly'); + + + + + + SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'Appointments:ManageAppointments'; + + + Add Appointment Manage role to superman + + INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'Appointments:ManageAppointments'); + + From 6eae473dd5b454d2c48f593027db2e5672581af6 Mon Sep 17 00:00:00 2001 From: Samridhi Agrawal Date: Fri, 20 Jan 2023 14:45:20 +0530 Subject: [PATCH 2/2] BAH-1418 | Madhuri,Samridhi | remove. extra roles for superman --- openmrs/migrations/liquibase.xml | 35 +------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/openmrs/migrations/liquibase.xml b/openmrs/migrations/liquibase.xml index 0488d27ef..80960f375 100644 --- a/openmrs/migrations/liquibase.xml +++ b/openmrs/migrations/liquibase.xml @@ -91,22 +91,11 @@ SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'OT: FullAccess'; - Add OT role for superman user + Add OT FullAccess role for superman INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'OT: FullAccess'); - - - - SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'OT: ReadOnly'; - - - Add OT role to superman - - INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'OT: ReadOnly'); - - @@ -118,28 +107,6 @@ INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'Appointments:FullAccess'); - - - - SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'Appointments:ReadOnly'; - - - Add Appointment ReadOnly role to superman - - INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'Appointments:ReadOnly'); - - - - - - SELECT count(*) from user_role WHERE user_id = (select user_id from users where username='superman') AND role = 'Appointments:ManageAppointments'; - - - Add Appointment Manage role to superman - - INSERT INTO user_role(user_id, role) values((SELECT user_id FROM users where username='superman'), 'Appointments:ManageAppointments'); - -