mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
create global object for the anonymous user
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user