diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ArchivaXworkUser.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ArchivaXworkUser.java index 051c1ff10..37df624f2 100644 --- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ArchivaXworkUser.java +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ArchivaXworkUser.java @@ -56,7 +56,15 @@ public class ArchivaXworkUser 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()