You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2003/08/07 15:19:01 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/ac2 DefaultAccessController.java AccessController.java

andreas     2003/08/07 06:19:01

  Modified:    src/java/org/apache/lenya/cms/cocoon/acting
                        DelegatingAuthorizerAction.java
                        AccessControlAction.java
               src/java/org/apache/lenya/cms/ac2
                        DefaultAccessController.java AccessController.java
  Log:
  moved identity initialization to AccessControlAction
  this means that also the authenticator initializes the identity
  (no crash when trying to login without authrorization after a Tomcat restart)
  
  Revision  Changes    Path
  1.14      +2 -15     cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthorizerAction.java
  
  Index: DelegatingAuthorizerAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthorizerAction.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DelegatingAuthorizerAction.java	30 Jul 2003 15:07:03 -0000	1.13
  +++ DelegatingAuthorizerAction.java	7 Aug 2003 13:19:01 -0000	1.14
  @@ -76,18 +76,6 @@
    */
   public class DelegatingAuthorizerAction extends AccessControlAction {
   
  -    /**
  -     * Authorizes a request.
  -     * @param request The request.
  -     * @return <code>true</code if the request is authorized, <code>false</code> otherwise.
  -     * @throws AccessControlException when something went wrong.
  -     */
  -    protected boolean authorize(Request request) throws AccessControlException {
  -
  -        boolean authorized = getAccessController().authorize(request);
  -        return authorized;
  -    }
  -
       private Map objectModel;
   
       /**
  @@ -118,10 +106,9 @@
   
           Request request = ObjectModelHelper.getRequest(objectModel);
           
  -        getAccessController().setupIdentity(request);
           setHistory(request);
   
  -        boolean authorized = authorize(request);
  +        boolean authorized = getAccessController().authorize(request);
   
           Map result = null;
           if (authorized) {
  
  
  
  1.4       +2 -1      cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/AccessControlAction.java
  
  Index: AccessControlAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/AccessControlAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AccessControlAction.java	5 Aug 2003 16:26:48 -0000	1.3
  +++ AccessControlAction.java	7 Aug 2003 13:19:01 -0000	1.4
  @@ -116,6 +116,7 @@
               if (accessController == null) {
                   result = Collections.EMPTY_MAP;
               } else {
  +                accessController.setupIdentity(request);
                   result = doAct(redirector, sourceResolver, objectModel, source, parameters);
               }
   
  
  
  
  1.11      +5 -2      cocoon-lenya/src/java/org/apache/lenya/cms/ac2/DefaultAccessController.java
  
  Index: DefaultAccessController.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac2/DefaultAccessController.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultAccessController.java	5 Aug 2003 16:26:01 -0000	1.10
  +++ DefaultAccessController.java	7 Aug 2003 13:19:01 -0000	1.11
  @@ -352,7 +352,10 @@
       }
   
       /**
  -     * @see org.apache.lenya.cms.ac2.AccessController#ownsIdenity(org.apache.lenya.cms.ac2.Identity)
  +     * Checks if this identity was initialized by this access controller.
  +     * @param identity An identity.
  +     * @return A boolean value.
  +     * @throws AccessControlException when something went wrong.
        */
       public boolean ownsIdenity(Identity identity) throws AccessControlException {
           return identity.belongsTo(getAccreditableManager());
  
  
  
  1.11      +1 -9      cocoon-lenya/src/java/org/apache/lenya/cms/ac2/AccessController.java
  
  Index: AccessController.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac2/AccessController.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AccessController.java	29 Jul 2003 17:23:18 -0000	1.10
  +++ AccessController.java	7 Aug 2003 13:19:01 -0000	1.11
  @@ -88,14 +88,6 @@
       boolean authorize(Request request) throws AccessControlException;
       
       /**
  -     * Checks if this identity was initialized by this access controller.
  -     * @param identity An identity.
  -     * @return A boolean value.
  -     * @throws AccessControlException when something went wrong.
  -     */
  -    //boolean ownsIdenity(Identity identity) throws AccessControlException;
  -    
  -    /**
        * Initializes the identity for this access controller.
        * @param request The request that contains the identity information.
        * @throws AccessControlException when something went wrong.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org