Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public SecurityFilterChain filterChain(HttpSecurity http,
"/api/news/**",
"/api/announcement",
"/api/project/info/*",
"/api/session/renew",
"/api/google-user/check-user-exists",
"/api/google-user/check-user-matches",
"/previewproject.html",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.wise.portal.spring.impl;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.authentication;
Expand Down Expand Up @@ -179,6 +180,12 @@ public void unauthenticated_contactNewsAndAnnouncement_shouldBeAllowed() throws
assertAuthorized(get("/api/announcement"));
}

@Test
public void unauthenticated_sessionRenew_shouldAnswerFalse() throws Exception {
MvcResult result = mockMvc.perform(get("/api/session/renew")).andReturn();
assertEquals("false", result.getResponse().getContentAsString());
}

@Test
public void unauthenticated_projectInfoAndGoogleUserChecks_shouldBeAllowed() throws Exception {
assertAuthorized(get("/api/project/info/123"));
Expand Down
Loading