jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject simplify index definitions (was: svn commit: r1468426 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java)
Date Tue, 16 Apr 2013 14:30:58 GMT
hi marcel

can't we just drop the derived node types from the configuration?
previously the index mechanism didn't know about node type inheritance
but as far as i understood this has been fixed in the mean time.

the same would also apply for the access control related index
configuration.

alex, could you confirm if that would work?

thanks
angela

On 4/16/13 4:18 PM, mreutegg@apache.org wrote:
> Author: mreutegg
> Date: Tue Apr 16 14:18:44 2013
> New Revision: 1468426
>
> URL: http://svn.apache.org/r1468426
> Log:
> OAK-779: Add rep:Authorizable to declaringNodeTypeNames of rep:principalName index
>
> Modified:
>      jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
>      jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
>
> Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java?rev=1468426&r1=1468425&r2=1468426&view=diff
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
(original)
> +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
Tue Apr 16 14:18:44 2013
> @@ -113,7 +113,7 @@ public class UserInitializer implements
>               if (!index.hasChild("principalName")) {
>                   IndexUtils.createIndexDefinition(index, "principalName", true,
>                           new String[]{REP_PRINCIPAL_NAME},
> -                        new String[]{NT_REP_GROUP, NT_REP_USER});
> +                        new String[]{NT_REP_GROUP, NT_REP_USER, NT_REP_AUTHORIZABLE});
>               }
>               if (!index.hasChild("members")) {
>                   IndexUtils.createIndexDefinition(index, "members", false, new String[]{UserConstants.REP_MEMBERS},
null);
>
> Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java?rev=1468426&r1=1468425&r2=1468426&view=diff
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
(original)
> +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
Tue Apr 16 14:18:44 2013
> @@ -103,7 +103,7 @@ public class UserInitializerTest extends
>           Tree princName = oakIndex.getChild("principalName");
>           assertIndexDefinition(princName, UserConstants.REP_PRINCIPAL_NAME, true);
>           String[] declaringNtNames = TreeUtil.getStrings(princName, IndexConstants.DECLARING_NODE_TYPES);
> -        assertArrayEquals(new String[]{UserConstants.NT_REP_GROUP, UserConstants.NT_REP_USER},
declaringNtNames);
> +        assertArrayEquals(new String[]{UserConstants.NT_REP_GROUP, UserConstants.NT_REP_USER,
UserConstants.NT_REP_AUTHORIZABLE}, declaringNtNames);
>
>           Tree members = oakIndex.getChild("members");
>           assertIndexDefinition(members, UserConstants.REP_MEMBERS, false);
>
>

Mime
View raw message