fix anonymous access

This commit is contained in:
Sebastian Sdorra
2012-02-25 16:47:53 +01:00
parent ca243fe8ef
commit 1be7a5dc58
2 changed files with 6 additions and 8 deletions

View File

@@ -120,16 +120,15 @@ public class BasicAuthenticationFilter extends HttpFilter
User user = null; User user = null;
String authentication = request.getHeader(HEADER_AUTHORIZATION); String authentication = request.getHeader(HEADER_AUTHORIZATION);
if (securityContext.isAuthenticated()) if (Util.isNotEmpty(authentication)
{ && authentication.toUpperCase().startsWith(AUTHORIZATION_BASIC_PREFIX))
user = securityContext.getUser();
}
else if (Util.isNotEmpty(authentication)
&& authentication.toUpperCase().startsWith(
AUTHORIZATION_BASIC_PREFIX))
{ {
user = authenticate(request, response, securityContext, authentication); user = authenticate(request, response, securityContext, authentication);
} }
else if (securityContext.isAuthenticated())
{
user = securityContext.getUser();
}
if (user == null) if (user == null)
{ {

View File

@@ -182,7 +182,6 @@ public class AnonymousAccessITCase
* @throws RepositoryClientException * @throws RepositoryClientException
*/ */
@Test @Test
@Ignore
public void testSimpleAdminPush() public void testSimpleAdminPush()
throws RepositoryClientException, IOException throws RepositoryClientException, IOException
{ {