Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 42cd6ab

Browse files
Temporarily removed event participant jurisdiction checks
1 parent 17c8795 commit 42cd6ab

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/utils/jurisdiction/EventParticipantJurisdictionHelper.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import de.symeda.sormas.api.event.EventParticipantJurisdictionDto;
1919
import de.symeda.sormas.api.user.JurisdictionLevel;
20-
import de.symeda.sormas.api.utils.DataHelper;
2120

2221
public class EventParticipantJurisdictionHelper {
2322

@@ -27,12 +26,15 @@ public static boolean isInJurisdictionOrOwned(
2726
UserJurisdiction userJurisdiction,
2827
EventParticipantJurisdictionDto eventParticipantJurisdiction) {
2928

30-
if (eventParticipantJurisdiction.getReportingUserUuid() != null
31-
&& DataHelper.equal(eventParticipantJurisdiction.getReportingUserUuid(), userJurisdiction.getUuid())) {
32-
return true;
33-
}
29+
/*
30+
* if (eventParticipantJurisdiction.getReportingUserUuid() != null
31+
* && DataHelper.equal(eventParticipantJurisdiction.getReportingUserUuid(), userJurisdiction.getUuid())) {
32+
* return true;
33+
* }
34+
* return false;
35+
*/
3436

35-
return false;
37+
return true;
3638

3739
}
3840
}

sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventParticipantJurisdictionChecker.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,13 @@
1515

1616
package de.symeda.sormas.backend.event;
1717

18+
import de.symeda.sormas.api.event.EventParticipantJurisdictionDto;
19+
import de.symeda.sormas.backend.user.UserService;
20+
1821
import javax.ejb.EJB;
1922
import javax.ejb.LocalBean;
2023
import javax.ejb.Stateless;
2124

22-
import de.symeda.sormas.api.event.EventParticipantJurisdictionDto;
23-
import de.symeda.sormas.api.utils.jurisdiction.EventParticipantJurisdictionHelper;
24-
import de.symeda.sormas.backend.user.User;
25-
import de.symeda.sormas.backend.user.UserService;
26-
import de.symeda.sormas.backend.util.JurisdictionHelper;
27-
2825
@Stateless(name = "EventParticipantJurisdictionChecker")
2926
@LocalBean
3027
public class EventParticipantJurisdictionChecker {
@@ -38,10 +35,13 @@ public boolean isInJurisdictionOrOwned(EventParticipant eventParticipant) {
3835
}
3936

4037
public boolean isInJurisdictionOrOwned(EventParticipantJurisdictionDto eventParticipantJurisdiction) {
41-
User user = userService.getCurrentUser();
42-
43-
return EventParticipantJurisdictionHelper
44-
.isInJurisdictionOrOwned(user.getJurisdictionLevel(), JurisdictionHelper.createUserJurisdiction(user), eventParticipantJurisdiction);
38+
/*
39+
* User user = userService.getCurrentUser();
40+
* return EventParticipantJurisdictionHelper
41+
* .isInJurisdictionOrOwned(user.getJurisdictionLevel(), JurisdictionHelper.createUserJurisdiction(user),
42+
* eventParticipantJurisdiction);
43+
*/
44+
return true;
4545
}
4646

4747
private EventParticipantJurisdictionDto createEventParticipantJurisdictionDto(EventParticipant eventParticipant) {

0 commit comments

Comments
 (0)