Index: src/java/org/apache/lenya/ac/Identity.java =================================================================== --- src/java/org/apache/lenya/ac/Identity.java (revision 168108) +++ src/java/org/apache/lenya/ac/Identity.java (working copy) @@ -136,7 +136,7 @@ if (identifiables[i] instanceof User) { User user = (User) identifiables[i]; User otherUser = manager.getUserManager().getUser(user.getId()); - belongs = belongs && user == otherUser; + belongs = belongs && user.equals(otherUser); } i++; } Index: src/java/org/apache/lenya/ac/file/FileUser.java =================================================================== --- src/java/org/apache/lenya/ac/file/FileUser.java (revision 168108) +++ src/java/org/apache/lenya/ac/file/FileUser.java (working copy) @@ -201,5 +201,19 @@ assert (configurationDirectory != null) && configurationDirectory.isDirectory(); this.configurationDirectory = configurationDirectory; } - + + /** + * @see java.lang.Object#equals(Object) + */ + public boolean equals(Object otherObject) { + boolean equals = false; + + if (getClass().isInstance(otherObject)) { + FileUser other = (FileUser) otherObject; + equals = (getConfigurationDirectory().equals(other.getConfigurationDirectory()) && + getId().equals(other.getId())); + } + + return equals; + } }