mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
Change correct filter for security
This commit is contained in:
@@ -84,7 +84,7 @@ public class SecurityFilter extends HttpFilter
|
||||
HttpServletResponse response, FilterChain chain)
|
||||
throws IOException, ServletException
|
||||
{
|
||||
if (!SecurityRequests.isAuthenticationRequest(request))
|
||||
if (!SecurityRequests.isAuthenticationRequest(request) && !SecurityRequests.isIndexRequest(request))
|
||||
{
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
if (hasPermission(subject))
|
||||
|
||||
@@ -26,7 +26,7 @@ public final class SecurityRequests {
|
||||
|
||||
public static boolean isIndexRequest(HttpServletRequest request) {
|
||||
String uri = request.getRequestURI().substring(request.getContextPath().length());
|
||||
return isAuthenticationRequest(uri);
|
||||
return isIndexRequest(uri);
|
||||
}
|
||||
|
||||
public static boolean isIndexRequest(String uri) {
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ApiAuthenticationFilter extends AuthenticationFilter
|
||||
throws IOException, ServletException
|
||||
{
|
||||
// skip filter on login resource
|
||||
if (SecurityRequests.isAuthenticationRequest(request) || SecurityRequests.isIndexRequest(request))
|
||||
if (SecurityRequests.isAuthenticationRequest(request) )
|
||||
{
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user