mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-10 00:26:52 +01:00
fix anonymous access
This commit is contained in:
@@ -120,16 +120,15 @@ public class BasicAuthenticationFilter extends HttpFilter
|
||||
User user = null;
|
||||
String authentication = request.getHeader(HEADER_AUTHORIZATION);
|
||||
|
||||
if (securityContext.isAuthenticated())
|
||||
{
|
||||
user = securityContext.getUser();
|
||||
}
|
||||
else if (Util.isNotEmpty(authentication)
|
||||
&& authentication.toUpperCase().startsWith(
|
||||
AUTHORIZATION_BASIC_PREFIX))
|
||||
if (Util.isNotEmpty(authentication)
|
||||
&& authentication.toUpperCase().startsWith(AUTHORIZATION_BASIC_PREFIX))
|
||||
{
|
||||
user = authenticate(request, response, securityContext, authentication);
|
||||
}
|
||||
else if (securityContext.isAuthenticated())
|
||||
{
|
||||
user = securityContext.getUser();
|
||||
}
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user