portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets CustomizeAction.java CustomizeSetAction.java
Date Sat, 01 Jun 2002 20:38:56 GMT
paulsp      2002/06/01 13:38:56

  Modified:    src/java/org/apache/jetspeed/modules/actions/portlets Tag:
                        security_14 CustomizeAction.java
                        CustomizeSetAction.java
  Log:
  Convert checkPermission() to user new pluggable security
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +3 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeAction.java
  
  Index: CustomizeAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeAction.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- CustomizeAction.java	5 Sep 2001 06:07:36 -0000	1.6
  +++ CustomizeAction.java	1 Jun 2002 20:38:56 -0000	1.6.2.1
  @@ -64,7 +64,9 @@
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
   import org.apache.jetspeed.om.registry.PortletEntry;
   import org.apache.jetspeed.om.registry.Parameter;
  +import org.apache.jetspeed.om.security.JetspeedUser;
   import org.apache.jetspeed.services.JetspeedSecurity;
  +import org.apache.jetspeed.services.security.PortalResource;
   
   // Turbine stuff
   import org.apache.turbine.util.Log;
  @@ -119,7 +121,7 @@
               if (  (!param.isHidden()) && (name.charAt(0)!='_') )
               {
                   // check the user role
  -                if (JetspeedSecurity.checkPermission(rundata, JetspeedSecurity.PERMISSION_CUSTOMIZE,
param))
  +                if (JetspeedSecurity.checkPermission((JetspeedUser)rundata.getUser(), new
PortalResource( entry, param), JetspeedSecurity.PERMISSION_CUSTOMIZE))
                   {
                       params.add(entry.getParameter(name));
                   }
  
  
  
  1.16.2.1  +7 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java
  
  Index: CustomizeSetAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java,v
  retrieving revision 1.16
  retrieving revision 1.16.2.1
  diff -u -r1.16 -r1.16.2.1
  --- CustomizeSetAction.java	1 Apr 2002 18:05:57 -0000	1.16
  +++ CustomizeSetAction.java	1 Jun 2002 20:38:56 -0000	1.16.2.1
  @@ -54,6 +54,7 @@
    
   package org.apache.jetspeed.modules.actions.portlets;
   
  +// Jetspeed imports
   import org.apache.jetspeed.portal.PortletSet;
   import org.apache.jetspeed.portal.PortletSkin;
   import org.apache.jetspeed.portal.PortletController;
  @@ -80,8 +81,11 @@
   import org.apache.jetspeed.om.profile.psml.PsmlController;
   import org.apache.jetspeed.om.profile.Control;
   import org.apache.jetspeed.om.profile.psml.PsmlControl;
  +import org.apache.jetspeed.om.security.JetspeedUser;
   import org.apache.jetspeed.services.idgenerator.JetspeedIdGenerator;
   import org.apache.jetspeed.services.JetspeedSecurity;
  +import org.apache.jetspeed.services.security.PortalResource;
  +
   import org.apache.jetspeed.om.profile.Layout;
   
   import org.apache.jetspeed.util.AutoProfile;
  @@ -584,7 +588,7 @@
               Iterator medias;
               
               // MODIFIED: Selection now takes care of the specified mediatype!
  -            if (JetspeedSecurity.checkPermission(data, JetspeedSecurity.PERMISSION_CUSTOMIZE,
entry) &&
  +            if (JetspeedSecurity.checkPermission((JetspeedUser) data.getUser(), new PortalResource(entry),
JetspeedSecurity.PERMISSION_CUSTOMIZE) &&
                  ((!entry.isHidden()) 
                   && (!entry.getType().equals(PortletEntry.TYPE_ABSTRACT))
                   && entry.hasMediaType(mediaType)))
  @@ -652,7 +656,7 @@
                                                                    (String)i.next());
               
               // MODIFIED: Selection now takes care of the specified mediatype!
  -            if (JetspeedSecurity.checkPermission(data, JetspeedSecurity.PERMISSION_CUSTOMIZE,
entry) &&
  +            if (JetspeedSecurity.checkPermission((JetspeedUser)data.getUser(), new PortalResource(entry),
JetspeedSecurity.PERMISSION_CUSTOMIZE) &&
                  ((!entry.isHidden())
                   && entry.hasMediaType(mediaType)))
               {
  @@ -687,7 +691,7 @@
           {
               RegistryEntry entry = Registry.getEntry(regName,(String)i.next());
               
  -            if (JetspeedSecurity.checkPermission(data, JetspeedSecurity.PERMISSION_CUSTOMIZE,
entry) &&
  +            if (JetspeedSecurity.checkPermission((JetspeedUser) data.getUser(), new PortalResource(entry),JetspeedSecurity.PERMISSION_CUSTOMIZE)
&&
                  (!entry.isHidden()))
               {
                   list.add(entry);
  
  
  

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


Mime
View raw message