Skip to content

Commit

Permalink
Fix - Änderungen im Broadcastservice versehentlich gepushed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nic12345678 committed Jun 13, 2024
1 parent c1b8c6d commit 588968d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
5 changes: 0 additions & 5 deletions wls-broadcast-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@
<artifactId>exception</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>de.muenchen.oss.wahllokalsystem.wls-common</groupId>
<artifactId>testing</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>

<!-- Datenbank -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ void accessDenied_dummyRolle() {
@Test
void accessDenied_missingOneAuthority_BROADCAST_WRITE_MESSAGE() {

// BroadcastSecurityUtils.runAs(TestConstants.TESTUSER, TestConstants.TESTPASSWORD, new String[] {
// BroadcastSecurityUtils.BROADCAST_BUSINESSACTION_BROADCAST
// });
SecurityUtils.runWith(new String[] {
BroadcastSecurityUtils.runAs(TestConstants.TESTUSER, TestConstants.TESTPASSWORD, new String[] {
BroadcastSecurityUtils.BROADCAST_BUSINESSACTION_BROADCAST
});

Expand All @@ -76,10 +73,7 @@ void accessDenied_missingOneAuthority_BROADCAST_BUSINESSACTION_BROADCAST() {

List<String> wahlbezirke = Arrays.asList("1", "2", "3", "4");
BroadcastMessageDTO m1 = new BroadcastMessageDTO(wahlbezirke, "I should fail");
// BroadcastSecurityUtils.runAs(TestConstants.TESTUSER, TestConstants.TESTPASSWORD, new String[] {
// BroadcastSecurityUtils.BROADCAST_WRITE_MESSAGE
// });
SecurityUtils.runWith(new String[] {
BroadcastSecurityUtils.runAs(TestConstants.TESTUSER, TestConstants.TESTPASSWORD, new String[] {
BroadcastSecurityUtils.BROADCAST_WRITE_MESSAGE
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package de.muenchen.oss.wahllokalsystem.broadcastservice.utils;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import de.muenchen.oss.wahllokalsystem.wls.common.testing.SecurityUtils;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.context.SecurityContextHolder;

public class BroadcastSecurityUtils extends SecurityUtils {
public class BroadcastSecurityUtils {

public static String BROADCAST_BUSINESSACTION_BROADCAST = "Broadcast_BUSINESSACTION_Broadcast";
public static String BROADCAST_BUSINESSACTION_NACHRICHTABRUFEN = "Broadcast_BUSINESSACTION_GetMessage";
Expand Down

0 comments on commit 588968d

Please sign in to comment.