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/services JetspeedSecurity.java
Date Sun, 02 Jun 2002 13:09:21 GMT
paulsp      2002/06/02 06:09:21

  Modified:    src/java/org/apache/jetspeed/services Tag: security_14
                        JetspeedSecurity.java
  Log:
  o  Converted remaining checkPermission() to use the PortalAccessController
  o  Removed depracation on checkPermission() that contain rundata.
  o  Added some javadoc
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.4  +17 -8     jakarta-jetspeed/src/java/org/apache/jetspeed/services/JetspeedSecurity.java
  
  Index: JetspeedSecurity.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/JetspeedSecurity.java,v
  retrieving revision 1.10.2.3
  retrieving revision 1.10.2.4
  diff -u -r1.10.2.3 -r1.10.2.4
  --- JetspeedSecurity.java	1 Jun 2002 20:37:40 -0000	1.10.2.3
  +++ JetspeedSecurity.java	2 Jun 2002 13:09:21 -0000	1.10.2.4
  @@ -81,7 +81,7 @@
    * 
    * @see org.apache.jetspeed.services.security.JetspeedSecurityService
    * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
  - * @version $Id: JetspeedSecurity.java,v 1.10.2.3 2002/06/01 20:37:40 paulsp Exp $
  + * @version $Id: JetspeedSecurity.java,v 1.10.2.4 2002/06/02 13:09:21 paulsp Exp $
    */
   
   abstract public class JetspeedSecurity extends TurbineSecurity
  @@ -103,28 +103,39 @@
       public static final String JETSPEED_ROLE_ADMIN = "admin";
   
       /**
  -     * @see JetspeedSecurityService#checkPermission
  +     * @see JetspeedPortalAccessController#checkPermission
        */
       public static boolean checkPermission(JetspeedUser user, Entry entry, String action)
       {
           return JetspeedPortalAccessController.checkPermission(user, entry, action);
       }
  +
  +    /**
  +     * @see JetspeedPortalAccessController#checkPermission
  +     */
       public static boolean checkPermission(JetspeedUser user, Portlet portlet, String action)
       {
           return JetspeedPortalAccessController.checkPermission(user, portlet, action);
       }
  +
  +    /**
  +     * @see JetspeedPortalAccessController#checkPermission
  +     */
       public static boolean checkPermission(JetspeedUser user, int resourceType, String resource,
String action)
       {
           return JetspeedPortalAccessController.checkPermission(user, resourceType, resource,
action);
       }
  +
  +    /**
  +     * @see JetspeedPortalAccessController#checkPermission
  +     */
       public static boolean checkPermission(JetspeedUser user, PortalResource resource, String
action)
       {
           return JetspeedPortalAccessController.checkPermission(user, resource, action);
       }
  +
       /**
        * @see JetspeedSecurityService#checkPermission
  -     *
  -     * @deprecated Use checkPermission( JetspeedUser, Portlet, Acction)
        */
       public static boolean checkPermission(RunData runData, String permission, Portlet portlet)
       {
  @@ -136,19 +147,17 @@
        */
       public static boolean checkPermission(RunData runData, String permission, RegistryEntry
entry)
       {
  -       return ((JetspeedSecurityService)getService()).checkPermission(runData, permission,
entry);
  +      return checkPermission((JetspeedUser) runData.getUser(), new PortalResource( entry),
permission);
       }
   
       /**
        * @see JetspeedSecurityService#checkPermission
  -     *
  -     * @deprecated Use checkPermission( JetspeedUser, Portlet, Acction)
        */
       public static boolean checkPermission(String user, String action, Portlet portlet)
       {
           try
           {
  -        return checkPermission((JetspeedUser) JetspeedSecurity.getUser(user), portlet,
action);
  +            return checkPermission((JetspeedUser) JetspeedSecurity.getUser(user), portlet,
action);
           } catch (Exception e)
           {
               Log.error(e.toString());
  
  
  

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