Reenable tests

This commit is contained in:
Marcus Hert Da Coregio
2024-02-27 15:07:25 -03:00
parent 4c9b10317f
commit 741d9f03a3
2 changed files with 1 additions and 3 deletions

View File

@@ -90,7 +90,7 @@ public class SecurityConfig {
private SessionLimit maxSessions() {
return (authentication) -> {
if (authentication.getAuthorities().contains(new SimpleGrantedAuthority("ROLE_UNLIMITED_SESSIONS"))) {
return Mono.just(-1);
return Mono.empty();
}
if (authentication.getAuthorities().contains(new SimpleGrantedAuthority("ROLE_ADMIN"))) {
return Mono.just(2);

View File

@@ -16,7 +16,6 @@
package com.example.maximumsessions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -35,7 +34,6 @@ import static org.springframework.security.test.web.reactive.server.SecurityMock
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureWebTestClient
@TestPropertySource(properties = "prevent-login=true")
@Disabled
class MaximumSessionsApplicationPreventLoginTests {
@Autowired