-get the security session using SecuritySystemConstants.SECURITY_SESSION_KEY or SecuritySession.ROLE in ArchivaXWorkUser
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-1.0.x@616198
13f79535-47bb-0310-9956-
ffa450edef68
private SecuritySession getSecuritySession()
{
- return (SecuritySession) getContextSession().get( SecuritySession.ROLE );
+ SecuritySession securitySession =
+ (SecuritySession) getContextSession().get( SecuritySystemConstants.SECURITY_SESSION_KEY );
+
+ if ( securitySession == null )
+ {
+ securitySession = (SecuritySession) getContextSession().get( SecuritySession.ROLE );
+ }
+
+ return securitySession;
}
public String getActivePrincipal()