create global object for the anonymous user

This commit is contained in:
Sebastian Sdorra
2012-10-02 16:02:44 +02:00
parent 7463e0f16f
commit f29bb6d983
4 changed files with 12 additions and 8 deletions

View File

@@ -288,10 +288,7 @@ public class AuthenticationResource
*/
private ScmState createAnonymousState()
{
User user = new User(SCMContext.USER_ANONYMOUS, "SCM Anonymous",
"scm-anonymous@scm-manager.com");
return createState(user, Collections.EMPTY_LIST);
return createState(SCMContext.ANONYMOUS, Collections.EMPTY_LIST);
}
/**

View File

@@ -164,8 +164,7 @@ public class SecurityFilter extends HttpFilter
}
else
{
user = new User(SCMContext.USER_ANONYMOUS, "SCM Anonymous",
"scm-anonymous@scm-manager.com");
user = SCMContext.ANONYMOUS;
}
return user;