lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andr...@apache.org
Subject cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/ac2 Identity.java UserAuthenticator.java
Date Thu, 07 Aug 2003 14:53:43 GMT
andreas     2003/08/07 07:53:43

  Modified:    src/java/org/apache/lenya/cms/ac2 Identity.java
                        UserAuthenticator.java
  Log:
  checking if identity contains user before adding
  
  Revision  Changes    Path
  1.9       +9 -1      cocoon-lenya/src/java/org/apache/lenya/cms/ac2/Identity.java
  
  Index: Identity.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac2/Identity.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Identity.java	29 Jul 2003 14:25:37 -0000	1.8
  +++ Identity.java	7 Aug 2003 14:53:43 -0000	1.9
  @@ -189,5 +189,13 @@
           }
           return machine;
        }
  +     
  +     /**
  +      * Checks if this identity contains a certain identifiable.
  +      * @param identifiable The identifiable to look for.
  +      */
  +     public boolean contains(Identifiable identifiable) {
  +         return identifiables.contains(identifiable);
  +     }
   
   }
  
  
  
  1.4       +4 -2      cocoon-lenya/src/java/org/apache/lenya/cms/ac2/UserAuthenticator.java
  
  Index: UserAuthenticator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac2/UserAuthenticator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UserAuthenticator.java	24 Jul 2003 13:57:11 -0000	1.3
  +++ UserAuthenticator.java	7 Aug 2003 14:53:43 -0000	1.4
  @@ -111,7 +111,9 @@
           boolean authenticated = false;
           if (user != null && user.authenticate(password)) {
               getLogger().debug("User [" + user + "] authenticated.");
  -            identity.addIdentifiable(user);
  +            if (!identity.contains(user)) {
  +                identity.addIdentifiable(user);
  +            }
               authenticated = true;
           }
           else {
  
  
  

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


Mime
View raw message