jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1430765 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/security/principal/ main/java/org/apache/jackrabbit/oak/security/user/ main/java/org/apache/jackrabbit/oak/spi/security/principal/ test/java/org/apache/ja...
Date Wed, 09 Jan 2013 10:22:28 GMT
Author: angela
Date: Wed Jan  9 10:22:28 2013
New Revision: 1430765

URL: http://svn.apache.org/viewvc?rev=1430765&view=rev
Log:
OAK-90 : Implement Principal Management (WIP)

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AdminPrincipalImpl.java
      - copied, changed from r1430723, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/AdminPrincipalImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/TreeBasedPrincipal.java
  (contents, props changed)
      - copied, changed from r1430352, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/TreeBasedPrincipal.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/PrincipalImplTest.java
Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/AdminPrincipalImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/TreeBasedPrincipal.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalConfigurationImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalProviderImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/GroupImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipal.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipalTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalConfigurationImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalConfigurationImpl.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalConfigurationImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalConfigurationImpl.java
Wed Jan  9 10:22:28 2013
@@ -34,11 +34,9 @@ import org.apache.jackrabbit.oak.spi.sec
 public class PrincipalConfigurationImpl extends SecurityConfiguration.Default implements
PrincipalConfiguration {
 
     private final SecurityProvider securityProvider;
-    private final ConfigurationParameters options;
 
     public PrincipalConfigurationImpl(SecurityProvider securityProvider, ConfigurationParameters
options) {
         this.securityProvider = securityProvider;
-        this.options = options;
     }
 
     @Nonnull

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalProviderImpl.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalProviderImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/PrincipalProviderImpl.java
Wed Jan  9 10:22:28 2013
@@ -140,19 +140,20 @@ public class PrincipalProviderImpl imple
     }
 
     //--------------------------------------------------------------------------
-
     /**
      * Function to covert an authorizable tree to a principal.
      */
-    private final class AuthorizableToPrincipal implements Function<Authorizable, Principal>
{
+    private static final class AuthorizableToPrincipal implements Function<Authorizable,
Principal> {
         @Override
         public Principal apply(Authorizable authorizable) {
-            try {
-                return authorizable.getPrincipal();
-            } catch (RepositoryException e) {
-                log.debug(e.getMessage());
-                return null;
+            if (authorizable != null) {
+                try {
+                    return authorizable.getPrincipal();
+                } catch (RepositoryException e) {
+                    log.debug(e.getMessage());
+                }
             }
+            return null;
         }
     }
 }
\ No newline at end of file

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AdminPrincipalImpl.java
(from r1430723, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/AdminPrincipalImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AdminPrincipalImpl.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AdminPrincipalImpl.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/AdminPrincipalImpl.java&r1=1430723&r2=1430765&rev=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/principal/AdminPrincipalImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AdminPrincipalImpl.java
Wed Jan  9 10:22:28 2013
@@ -14,19 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.security.principal;
+package org.apache.jackrabbit.oak.security.user;
 
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.namepath.PathMapper;
 import org.apache.jackrabbit.oak.spi.security.principal.AdminPrincipal;
-import org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal;
 
 /**
  * AdminPrincipal variant of the {@link TreeBasedPrincipal}.
  */
-public class AdminPrincipalImpl extends TreeBasedPrincipal implements AdminPrincipal {
+class AdminPrincipalImpl extends TreeBasedPrincipal implements AdminPrincipal {
 
-    public AdminPrincipalImpl(String principalName, Tree tree, PathMapper pathMapper) {
+    AdminPrincipalImpl(String principalName, Tree tree, PathMapper pathMapper) {
         super(principalName, tree, pathMapper);
     }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/GroupImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/GroupImpl.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/GroupImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/GroupImpl.java
Wed Jan  9 10:22:28 2013
@@ -19,10 +19,10 @@ package org.apache.jackrabbit.oak.securi
 import java.security.Principal;
 import java.util.Enumeration;
 import java.util.Iterator;
-import javax.annotation.Nullable;
 import javax.jcr.RepositoryException;
 
 import com.google.common.base.Function;
+import com.google.common.base.Predicates;
 import com.google.common.collect.Iterators;
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
@@ -30,7 +30,6 @@ import org.apache.jackrabbit.api.securit
 import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal;
-import org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal;
 import org.apache.jackrabbit.oak.spi.security.user.AuthorizableType;
 import org.apache.jackrabbit.oak.spi.security.user.util.UserUtility;
 import org.slf4j.Logger;
@@ -243,8 +242,10 @@ class GroupImpl extends AuthorizableImpl
 
             Iterator<Principal> principals = Iterators.transform(members, new Function<Authorizable,
Principal>() {
                 @Override
-                public Principal apply(@Nullable Authorizable authorizable) {
-                    assert authorizable != null;
+                public Principal apply(Authorizable authorizable) {
+                    if (authorizable == null) {
+                        return null;
+                    }
                     try {
                         return authorizable.getPrincipal();
                     } catch (RepositoryException e) {
@@ -254,7 +255,7 @@ class GroupImpl extends AuthorizableImpl
                     }
                 }
             });
-            return Iterators.asEnumeration(principals);
+            return Iterators.asEnumeration(Iterators.filter(principals, Predicates.<Object>notNull()));
         }
     }
 }
\ No newline at end of file

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/TreeBasedPrincipal.java
(from r1430352, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/TreeBasedPrincipal.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/TreeBasedPrincipal.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/TreeBasedPrincipal.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/TreeBasedPrincipal.java&r1=1430352&r2=1430765&rev=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/TreeBasedPrincipal.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/TreeBasedPrincipal.java
Wed Jan  9 10:22:28 2013
@@ -14,42 +14,32 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.spi.security.principal;
+package org.apache.jackrabbit.oak.security.user;
 
 import org.apache.jackrabbit.api.security.principal.ItemBasedPrincipal;
-import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.namepath.PathMapper;
 import org.apache.jackrabbit.oak.security.principal.PrincipalImpl;
-import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
-
-import static org.apache.jackrabbit.oak.api.Type.STRING;
 
 /**
  * TreeBasedPrincipal...
  */
-public class TreeBasedPrincipal extends PrincipalImpl implements ItemBasedPrincipal {
+class TreeBasedPrincipal extends PrincipalImpl implements ItemBasedPrincipal {
 
     private final String path;
     private final PathMapper pathMapper;
 
-    public TreeBasedPrincipal(Tree tree, PathMapper pathMapper) {
-        super(getPrincipalName(tree));
-        this.pathMapper = pathMapper;
-        this.path = tree.getPath();
-    }
-
-    public TreeBasedPrincipal(String principalName, Tree tree, PathMapper pathMapper) {
+    TreeBasedPrincipal(String principalName, Tree tree, PathMapper pathMapper) {
         this(principalName, tree.getPath(), pathMapper);
     }
 
-    public TreeBasedPrincipal(String principalName, String oakPath, PathMapper pathMapper)
{
+    TreeBasedPrincipal(String principalName, String oakPath, PathMapper pathMapper) {
         super(principalName);
         this.pathMapper = pathMapper;
         this.path = oakPath;
     }
 
-    public String getOakPath() {
+    String getOakPath() {
         return path;
     }
 
@@ -58,13 +48,4 @@ public class TreeBasedPrincipal extends 
     public String getPath() {
         return pathMapper.getJcrPath(path);
     }
-
-    //--------------------------------------------------------------------------
-    private static String getPrincipalName(Tree tree) {
-        PropertyState prop = tree.getProperty(UserConstants.REP_PRINCIPAL_NAME);
-        if (prop == null) {
-            throw new IllegalArgumentException("Tree doesn't have rep:principalName property");
-        }
-        return prop.getValue(STRING);
-    }
 }
\ No newline at end of file

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/TreeBasedPrincipal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImpl.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImpl.java
Wed Jan  9 10:22:28 2013
@@ -25,8 +25,6 @@ import org.apache.jackrabbit.api.securit
 import org.apache.jackrabbit.api.security.user.User;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.security.principal.AdminPrincipalImpl;
-import org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal;
 import org.apache.jackrabbit.oak.spi.security.user.AuthorizableType;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
 import org.apache.jackrabbit.oak.spi.security.user.util.PasswordUtility;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
Wed Jan  9 10:22:28 2013
@@ -49,7 +49,6 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.security.principal.PrincipalImpl;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.principal.PrincipalProvider;
-import org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
 import org.apache.jackrabbit.oak.spi.xml.NodeInfo;
 import org.apache.jackrabbit.oak.spi.xml.PropInfo;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProvider.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserProvider.java
Wed Jan  9 10:22:28 2013
@@ -35,7 +35,6 @@ import org.apache.jackrabbit.oak.api.Tre
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.query.PropertyValues;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
-import org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal;
 import org.apache.jackrabbit.oak.spi.security.user.AuthorizableNodeName;
 import org.apache.jackrabbit.oak.spi.security.user.AuthorizableType;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipal.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipal.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipal.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipal.java
Wed Jan  9 10:22:28 2013
@@ -17,22 +17,16 @@
 package org.apache.jackrabbit.oak.spi.security.principal;
 
 import java.security.Principal;
+import java.security.acl.Group;
 import java.util.Enumeration;
 
 import org.apache.jackrabbit.api.security.principal.JackrabbitPrincipal;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Built-in principal group that has every other principal as member.
  */
 public class EveryonePrincipal implements JackrabbitPrincipal, java.security.acl.Group {
 
-    /**
-     * logger instance
-     */
-    private static final Logger log = LoggerFactory.getLogger(EveryonePrincipal.class);
-
     public static final String NAME = "everyone";
 
     private static final EveryonePrincipal INSTANCE = new EveryonePrincipal();
@@ -81,7 +75,7 @@ public class EveryonePrincipal implement
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
-        } else if (obj instanceof JackrabbitPrincipal) {
+        } else if (obj instanceof JackrabbitPrincipal && obj instanceof Group) {
             JackrabbitPrincipal other = (JackrabbitPrincipal) obj;
             return NAME.equals(other.getName());
         }

Added: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/PrincipalImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/PrincipalImplTest.java?rev=1430765&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/PrincipalImplTest.java
(added)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/PrincipalImplTest.java
Wed Jan  9 10:22:28 2013
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.security.principal;
+
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.jackrabbit.api.security.principal.JackrabbitPrincipal;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+/**
+ * PrincipalImplTest...
+ */
+public class PrincipalImplTest {
+
+    private Principal principal = new PrincipalImpl("name");
+
+    @Test
+    public void testGetName() {
+        assertEquals("name", principal.getName());
+    }
+
+    @Test
+    public void testEquals() {
+        List<Principal> principals = new ArrayList<Principal>();
+        principals.add(new PrincipalImpl("name"));
+        principals.add(new JackrabbitPrincipal() {
+            @Override
+            public String getName() {
+                return "name";
+            }
+        });
+
+        for (Principal p : principals) {
+            assertEquals(principal, p);
+        }
+    }
+
+    @Test
+    public void testNotEquals() {
+        List<Principal> principals = new ArrayList<Principal>();
+        principals.add(new PrincipalImpl("otherName"));
+        principals.add(new Principal() {
+            @Override
+            public String getName() {
+                return "name";
+            }
+        });
+
+        for (Principal p : principals) {
+            assertFalse(principal.equals(p));
+        }
+    }
+}
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipalTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipalTest.java?rev=1430765&r1=1430764&r2=1430765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipalTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/principal/EveryonePrincipalTest.java
Wed Jan  9 10:22:28 2013
@@ -65,14 +65,12 @@ public class EveryonePrincipalTest exten
     @Test
     public void testEqualsOtherJackrabbitPrincipal() {
         Principal someotherEveryone = new OtherEveryone();
-
-        assertEquals(everyone, someotherEveryone);
+        assertFalse(everyone.equals(someotherEveryone));
     }
 
     @Test
     public void testEqualsOtherJackrabbitGroup() {
         Principal someotherEveryone = new OtherEveryoneGroup();
-
         assertEquals(everyone, someotherEveryone);
     }
 
@@ -109,12 +107,12 @@ public class EveryonePrincipalTest exten
 
         @Override
         public boolean isMember(Principal principal) {
-            return false;
+            return true;
         }
 
         @Override
         public Enumeration<? extends Principal> members() {
-            return null;
+            throw new UnsupportedOperationException();
         }
     }
 }



Mime
View raw message