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/src/java/org/apache/jetspeed/portal/portlets/customize CustomizePortlet.java
Date Thu, 07 Jun 2001 07:31:54 GMT
taylor      01/06/07 00:31:53

  Modified:    src/java/org/apache/jetspeed/portal/portlets/customize
                        CustomizePortlet.java
  Log:
  updated CustomizePortlet to check which portlets may be personalized
  
  Revision  Changes    Path
  1.13      +10 -6     jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/customize/CustomizePortlet.java
  
  Index: CustomizePortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/customize/CustomizePortlet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CustomizePortlet.java	2001/06/04 17:47:11	1.12
  +++ CustomizePortlet.java	2001/06/07 07:31:49	1.13
  @@ -65,6 +65,7 @@
   
   import org.apache.jetspeed.profiler.*;
   import org.apache.jetspeed.services.Profiler;
  +import org.apache.jetspeed.services.JetspeedSecurity;
   
   import org.apache.jetspeed.util.*;
   
  @@ -128,7 +129,7 @@
      
       * @param Vector portlets - the Vector where the found PortletEntry objects will be
stored in
       */
  -   private void getAvailablePortlets( Vector portlets )
  +   private void getAvailablePortlets( Vector portlets, RunData data )
      {
         // get the Maximum number of portlets defined in protlet registry
         int maxNumber;
  @@ -147,7 +148,10 @@
                PortletEntry portletEntry = ( PortletEntry )  entryEnumeration.nextElement(
);
                if ( portletEntry != null ) 
                   // check for admin-Flag
  -                if ( !portletEntry.isAdmin( ) ) 
  +//                if ( !portletEntry.isAdmin( ) ) 
  +                  if ( JetspeedSecurity.checkPermission(data, 
  +                                                        JetspeedSecurity.PERMISSION_PERSONALIZE,

  +                                                        portletEntry))
                      // check for hidden-Flag
                      if ( !portletEntry.isHidden( ) ) 
                         // check for application-Flag
  @@ -219,7 +223,7 @@
           Vector availablePortlets = new Vector( );
           // read the available portlets from the PortletRegistry
           // !! stores PortletEntries in the Vector
  -        getAvailablePortlets( availablePortlets ) ;
  +        getAvailablePortlets( availablePortlets, data ) ;
           // read the users portlets
           // !! stores Entry-Ojects in the Vector 
           Vector usersHTMLPortlets = new Vector( );
  @@ -266,7 +270,7 @@
           // check for the capabilities of the portlets
           // checks for HTML and WML
       
  -        getCapabilities( bean );
  +        getCapabilities( bean, data );
       
           // get the needed URIs from URILookup
           String homeURL = null;
  @@ -609,11 +613,11 @@
       * @param bean org.apache.jetspeed.portal.portlets.customize.CustomizeBean - The bean
which keeps the information
         that the JSPs need. The capabilities will be stored in the bean.
       */
  -   private void getCapabilities( CustomizeBean bean ) 
  +   private void getCapabilities( CustomizeBean bean, RunData data ) 
      {
         PortletDataBean[] dataBeans = bean.getPortletDataBeans( );
         Vector availablePortlets = new Vector( );
  -      getAvailablePortlets( availablePortlets );
  +      getAvailablePortlets( availablePortlets, data );
         for( int i=0; i<dataBeans.length; i++ )
         {
            PortletDataBean portletBean = dataBeans[i];
  
  
  

---------------------------------------------------------------------
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