portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/security/impl SecurityValveImpl.java
Date Fri, 24 Sep 2004 22:23:02 GMT
taylor      2004/09/24 15:23:02

  Modified:    portal/src/java/org/apache/jetspeed/security/impl
                        SecurityValveImpl.java
  Log:
  reserved session parameters into common PortalReservedParamters
  i need to access this in other parts of portal
  
  Revision  Changes    Path
  1.7       +9 -4      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/security/impl/SecurityValveImpl.java
  
  Index: SecurityValveImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/security/impl/SecurityValveImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SecurityValveImpl.java	2 Aug 2004 18:57:28 -0000	1.6
  +++ SecurityValveImpl.java	24 Sep 2004 22:23:02 -0000	1.7
  @@ -23,6 +23,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.jetspeed.PortalReservedParameters;
   import org.apache.jetspeed.pipeline.PipelineException;
   import org.apache.jetspeed.pipeline.valve.AbstractValve;
   import org.apache.jetspeed.pipeline.valve.ValveContext;
  @@ -58,7 +59,8 @@
           try
           {            
               Principal principal = request.getRequest().getUserPrincipal();
  -            Subject subject = (Subject) request.getRequest().getSession().getAttribute(this.getClass().toString()
+ ".subject");
  +            Subject subject = (Subject) 
  +                request.getRequest().getSession().getAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT);
               if (null == principal)
               {
                   principal = new UserPrincipalImpl(profiler.getAnonymousUser());
  @@ -68,7 +70,9 @@
                   Set principals = new HashSet();
                   principals.add(principal);
                   subject = new Subject(true, principals, new HashSet(), new HashSet());
  -                request.getRequest().getSession().setAttribute(this.getClass().toString()
+ ".subject", subject);
  +                request.getRequest().getSession().setAttribute(
  +                        PortalReservedParameters.SESSION_KEY_SUBJECT,
  +                        subject);
               }
               else
               {
  @@ -77,7 +81,8 @@
                       && (!(principal.getName()).equals(profiler.getAnonymousUser())))
                   {
                       subject = userMgr.getUser(principal.getName()).getSubject();
  -                    request.getRequest().getSession().setAttribute(this.getClass().toString()
+ ".subject", subject);
  +                    request.getRequest().getSession().setAttribute(
  +                            PortalReservedParameters.SESSION_KEY_SUBJECT, subject);
                   }
               }
               request.setSubject(subject);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message