Examples of ACE


Examples of org.apache.chemistry.opencmis.commons.data.Ace

    }

    public Ace createAce(String principal, List<String> permissions) {
        BindingsObjectFactory bof = getBindingsObjectFactory();

        Ace ace = bof.createAccessControlEntry(principal, permissions);

        return ace;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

    }
   
   
    @Test
    public void testConvertToCmisAcl() {
        Ace ace = aceN.toCommonsAce();
        assertEquals(ANDREAS, ace.getPrincipalId());
        assertEquals(1, ace.getPermissions().size());
        assertEquals("", ace.getPermissions().get(0));

        ace = aceR.toCommonsAce();
        assertEquals(BERTA, ace.getPrincipalId());
        assertEquals(1, ace.getPermissions().size());
        assertEquals(EnumBasicPermissions.CMIS_READ.value(), ace.getPermissions().get(0));

        ace = aceW.toCommonsAce();
        assertEquals(CHRISTIAN, ace.getPrincipalId());
        assertEquals(1, ace.getPermissions().size());
        assertEquals(EnumBasicPermissions.CMIS_WRITE.value(), ace.getPermissions().get(0));

        ace = aceA.toCommonsAce();
        assertEquals(DOROTHEE, ace.getPrincipalId());
        assertEquals(1, ace.getPermissions().size());
        assertEquals(EnumBasicPermissions.CMIS_ALL.value(), ace.getPermissions().get(0));
       
        InMemoryAcl acl = createDefaultAcl();
        Acl commonsAcl = acl.toCommonsAcl();
        assertEquals(4, commonsAcl.getAces().size());
        assertTrue(hasCommonsAce(commonsAcl, ANDREAS, ""));
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

        byte[] content = readContent(contentStream2);
        assertContent(CONTENT, content);

        // apply an ACL
        if (supportsManageACLs()) {
            Ace ace = getObjectFactory()
                    .createAccessControlEntry(getUsername(), Collections.singletonList("cmis:read"));
            Acl acl = getObjectFactory().createAccessControlList(Collections.singletonList(ace));

            Acl newAcl = getBinding().getAclService().applyAcl(getTestRepositoryId(), docId, acl, null,
                    getAclPropagation(), null);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

    }

    public Ace createAce(String principal, List<String> permissions) {
        BindingsObjectFactory bof = getBindingsObjectFactory();

        Ace ace = bof.createAccessControlEntry(principal, permissions);

        return ace;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

    }

    public Ace createAce(String principal, List<String> permissions) {
        BindingsObjectFactory bof = getBindingsObjectFactory();

        Ace ace = bof.createAccessControlEntry(principal, permissions);

        return ace;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

        byte[] content = readContent(contentStream2);
        assertContent(CONTENT, content);

        // apply an ACL
        if (supportsManageACLs()) {
            Ace ace = getObjectFactory()
                    .createAccessControlEntry(getUsername(), Collections.singletonList("cmis:read"));
            Acl acl = getObjectFactory().createAccessControlList(Collections.singletonList(ace));

            Acl newAcl = getBinding().getAclService().applyAcl(getTestRepositoryId(), docId, acl, null,
                    getAclPropagation(), null);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

    }

    public Ace createAce(String principal, List<String> permissions) {
        BindingsObjectFactory bof = getBindingsObjectFactory();

        Ace ace = bof.createAccessControlEntry(principal, permissions);

        return ace;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

        byte[] content = readContent(contentStream2);
        assertContent(CONTENT, content);

        // apply an ACL
        if (supportsManageACLs()) {
            Ace ace = getObjectFactory()
                    .createAccessControlEntry(getUsername(), Collections.singletonList("cmis:read"));
            Acl acl = getObjectFactory().createAccessControlList(Collections.singletonList(ace));

            Acl newAcl = getBinding().getAclService().applyAcl(getTestRepositoryId(), docId, acl, null,
                    getAclPropagation(), null);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Ace

        return getObject().getAcl().getAces().size();
    }

    public Object getDetailValueAt(int rowIndex, int columnIndex) {
        Ace ace = getObject().getAcl().getAces().get(rowIndex);

        switch (columnIndex) {
        case 0:
            return ace.getPrincipalId();
        case 1:
            return ace.getPermissions();
        case 2:
            return ace.isDirect();
        }

        return null;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.ACE

    private ACE createACE(@Nullable String oakPath,
                          @Nonnull Tree aceTree,
                          @Nonnull RestrictionProvider restrictionProvider) throws RepositoryException {
        boolean isAllow = NT_REP_GRANT_ACE.equals(TreeUtil.getPrimaryTypeName(aceTree));
        Set<Restriction> restrictions = restrictionProvider.readRestrictions(oakPath, aceTree);
        return new ACE(getPrincipal(aceTree), getPrivileges(aceTree), isAllow, restrictions, namePathMapper);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.