From afeefc7f15279b83b1a22a83b2f2ade75f3f5e07 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Wed, 30 Jan 2008 02:51:54 +0000 Subject: [PATCH] -merged with -r616198 in archiva-1.0.x branch git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@616600 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/archiva/web/util/ArchivaXworkUser.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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()