mirror of https://github.com/apache/archiva.git
-fixed browse repo problem (permissions)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@593445 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb76decee7
commit
d5a9482dd2
|
@ -24,6 +24,7 @@ import com.opensymphony.xwork.ActionContext;
|
||||||
import org.apache.maven.archiva.security.ArchivaRoleConstants;
|
import org.apache.maven.archiva.security.ArchivaRoleConstants;
|
||||||
import org.apache.maven.archiva.security.ArchivaUser;
|
import org.apache.maven.archiva.security.ArchivaUser;
|
||||||
import org.codehaus.plexus.redback.system.SecuritySession;
|
import org.codehaus.plexus.redback.system.SecuritySession;
|
||||||
|
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
|
||||||
import org.codehaus.plexus.redback.users.User;
|
import org.codehaus.plexus.redback.users.User;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -55,12 +56,13 @@ public class ArchivaXworkUser
|
||||||
|
|
||||||
private SecuritySession getSecuritySession()
|
private SecuritySession getSecuritySession()
|
||||||
{
|
{
|
||||||
return (SecuritySession) getContextSession().get( SecuritySession.ROLE );
|
return (SecuritySession) getContextSession().get( SecuritySystemConstants.SECURITY_SESSION_KEY );
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getActivePrincipal()
|
public String getActivePrincipal()
|
||||||
{
|
{
|
||||||
SecuritySession securitySession = getSecuritySession();
|
SecuritySession securitySession = getSecuritySession();
|
||||||
|
|
||||||
if ( securitySession == null )
|
if ( securitySession == null )
|
||||||
{
|
{
|
||||||
return ArchivaRoleConstants.PRINCIPAL_GUEST;
|
return ArchivaRoleConstants.PRINCIPAL_GUEST;
|
||||||
|
|
Loading…
Reference in New Issue