Search in sources :

Example 6 with ReturnValues

use of com.enonic.xp.repo.impl.ReturnValues in project xp by enonic.

the class GetResultCanReadResolverTest method group_access.

@Test
public void group_access() throws Exception {
    final ReturnValues returnValues = ReturnValues.create().add(IndexFieldNameNormalizer.normalize(NodeIndexPath.PERMISSIONS_READ.toString()), Arrays.asList("user:system:rmy", "group:system:my-group")).build();
    assertTrue(GetResultCanReadResolver.canRead(PrincipalKeys.from(PrincipalKey.from("user:system:rmy"), PrincipalKey.from("group:system:my-group")), returnValues.get(NodeIndexPath.PERMISSIONS_READ.toString())));
}
Also used : ReturnValues(com.enonic.xp.repo.impl.ReturnValues) Test(org.junit.jupiter.api.Test)

Aggregations

ReturnValues (com.enonic.xp.repo.impl.ReturnValues)6 Test (org.junit.jupiter.api.Test)4 BlobKeys (com.enonic.xp.blob.BlobKeys)1 NodeVersionKey (com.enonic.xp.blob.NodeVersionKey)1 NodeId (com.enonic.xp.node.NodeId)1 ReturnValue (com.enonic.xp.repo.impl.ReturnValue)1 Instant (java.time.Instant)1