Skip to content

Commit

Permalink
Delete SITreg.Organizer #5, limit deletions to creator
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorwolf authored Aug 19, 2016
1 parent 55e4961 commit ae661bd
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/procedures/setup.hdbprocedure
Original file line number Diff line number Diff line change
Expand Up @@ -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
END

0 comments on commit ae661bd

Please # to comment.