mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 02:31:14 +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)
|
||||
{
|
||||
|
||||
@@ -182,7 +182,6 @@ public class AnonymousAccessITCase
|
||||
* @throws RepositoryClientException
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testSimpleAdminPush()
|
||||
throws RepositoryClientException, IOException
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user