From ae661bdafba065b4d6f6e722ed81ec3c62137ce4 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 19 Aug 2016 07:23:23 +0200 Subject: [PATCH] Delete SITreg.Organizer #5, limit deletions to creator --- test/procedures/setup.hdbprocedure | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/test/procedures/setup.hdbprocedure b/test/procedures/setup.hdbprocedure index d4eade9..e266125 100644 --- a/test/procedures/setup.hdbprocedure +++ b/test/procedures/setup.hdbprocedure @@ -8,13 +8,20 @@ BEGIN EXEC 'CREATE USER COORGANIZER PASSWORD Init1234;'; EXEC 'CREATE USER PARTICIPANT PASSWORD Init1234;'; - DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.Event"; - DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.Participant"; - DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.CoOrganizer"; - DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.RegisterAsOrganizerQueue"; + DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.Event" + WHERE "History.CreatedBy" = 'ORGANIZER' + OR "History.CreatedBy" = 'COORGANIZER'; + DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.Participant" + WHERE "History.CreatedBy" = 'PARTICIPANT'; + DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.CoOrganizer" + WHERE "History.CreatedBy" = 'ORGANIZER'; + DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.RegisterAsOrganizerQueue" + WHERE "History.CreatedBy" = 'PARTICIPANT'; + DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.Organizer" + WHERE "History.CreatedBy" = 'PARTICIPANT'; CALL _SYS_REPO.GRANT_ACTIVATED_ROLE ('com.sap.sapmentors.sitreg.roles::organizer','ORGANIZER'); CALL _SYS_REPO.GRANT_ACTIVATED_ROLE ('com.sap.sapmentors.sitreg.roles::organizer','COORGANIZER'); CALL _SYS_REPO.GRANT_ACTIVATED_ROLE ('com.sap.sapmentors.sitreg.roles::participant','PARTICIPANT'); -END \ No newline at end of file +END