diff options
author | Maria Odea B. Ching <oching@apache.org> | 2007-11-09 08:01:03 +0000 |
---|---|---|
committer | Maria Odea B. Ching <oching@apache.org> | 2007-11-09 08:01:03 +0000 |
commit | d5a9482dd286b19cea7704997e67bc25e6c1ad27 (patch) | |
tree | bc125c95bd50a643a36be3dfa093f66d0a7542a0 | |
parent | eb76decee7a1b07132471726295aa5d29e55ace5 (diff) | |
download | archiva-d5a9482dd286b19cea7704997e67bc25e6c1ad27.tar.gz archiva-d5a9482dd286b19cea7704997e67bc25e6c1ad27.zip |
-fixed browse repo problem (permissions)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@593445 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ArchivaXworkUser.java | 8 |
1 files changed, 5 insertions, 3 deletions
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 44223b82c..a9ce2ebb6 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 @@ -24,6 +24,7 @@ import com.opensymphony.xwork.ActionContext; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.security.ArchivaUser; import org.codehaus.plexus.redback.system.SecuritySession; +import org.codehaus.plexus.redback.system.SecuritySystemConstants; import org.codehaus.plexus.redback.users.User; import java.util.HashMap; @@ -55,18 +56,19 @@ public class ArchivaXworkUser private SecuritySession getSecuritySession() { - return (SecuritySession) getContextSession().get( SecuritySession.ROLE ); + return (SecuritySession) getContextSession().get( SecuritySystemConstants.SECURITY_SESSION_KEY ); } public String getActivePrincipal() { - SecuritySession securitySession = getSecuritySession(); + SecuritySession securitySession = getSecuritySession(); + if ( securitySession == null ) { return ArchivaRoleConstants.PRINCIPAL_GUEST; } - User user = securitySession.getUser(); + User user = securitySession.getUser(); if ( user == null ) { return ArchivaRoleConstants.PRINCIPAL_GUEST; |