Skip to content

Commit

Permalink
Rechte Ausrichter DSBMitglied, add Permission Spotter-Interface (Liga…
Browse files Browse the repository at this point in the history
…leiter, Ausrichter) im Backend
  • Loading branch information
Sarah Keifer committed Jan 22, 2025
1 parent 974c8c4 commit c3ff9f5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ private void saveMatch(MatchDTO matchDTO, Long userId) {
@PostMapping(value = "spotter",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE)
@RequiresOnePermissions(perm = {UserPermission.CAN_MODIFY_WETTKAMPF, UserPermission.CAN_MODIFY_MY_WETTKAMPF,UserPermission.CAN_MODIFY_MY_VERANSTALTUNG})
@RequiresOnePermissions(perm = {UserPermission.CAN_MODIFY_WETTKAMPF, UserPermission.CAN_MODIFY_MY_WETTKAMPF,UserPermission.CAN_MODIFY_MY_VERANSTALTUNG,UserPermission.CAN_OPERATE_SPOTTING})
public MatchDTO saveMatchesSpotter(@RequestBody final MatchDTO matchDTO, final Principal principal) throws NoPermissionException{
final Long userId = UserProvider.getCurrentUserId(principal);
Preconditions.checkArgument(userId >= 0, PRECONDITION_MSG_USER_ID);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
Add Role Can create DSB-Mitglied for Ausrichter for their own Veranstaltung
*/
/* Ausrichter, DSB-Mitglied anlegen und DSB-Mitglied bearbeiten für seinen eigenen Verein*/
INSERT INTO rolle_recht(rolle_recht_rolle_id,
rolle_recht_recht_id)
VALUES (4, 26);
INSERT INTO rolle_recht(rolle_recht_rolle_id,
rolle_recht_recht_id)
VALUES (4, 27);

/* (Admin), Ligaleiter, Ausrichter brauchen die Berechtigung für das Spotter-Interface */
INSERT INTO rolle_recht(rolle_recht_rolle_id,
rolle_recht_recht_id)
VALUES (2, 17);
INSERT INTO rolle_recht(rolle_recht_rolle_id,
rolle_recht_recht_id)
VALUES (4, 17);

0 comments on commit c3ff9f5

Please sign in to comment.