added groups to state

This commit is contained in:
Sebastian Sdorra
2011-01-07 18:26:37 +01:00
parent adf7fae446
commit 1256ff7959
2 changed files with 41 additions and 28 deletions

View File

@@ -99,7 +99,8 @@ public class AuthenticationResource
if (user != null)
{
resp = Response.ok(getState(user)).build();
resp = Response.ok(new ScmState(securityContext,
repositoryManger.getTypes())).build();
}
else
{
@@ -135,7 +136,7 @@ public class AuthenticationResource
if (user != null)
{
state = getState(user);
state = new ScmState(securityContext, repositoryManger.getTypes());
}
else
{
@@ -167,7 +168,7 @@ public class AuthenticationResource
logger.debug("return state for user {}", user.getName());
}
state = getState(user);
state = new ScmState(securityContext, repositoryManger.getTypes());
response = Response.ok(state).build();
}
else
@@ -178,25 +179,6 @@ public class AuthenticationResource
return response;
}
/**
* Method description
*
*
*
* @param user
*
* @return
*/
private ScmState getState(User user)
{
ScmState state = new ScmState();
state.setUser(user);
state.setRepositoryTypes(repositoryManger.getTypes().toArray(new Type[0]));
return state;
}
//~--- fields ---------------------------------------------------------------
/** Field description */