Package org.apache.jackrabbit.oak.security.principal

Examples of org.apache.jackrabbit.oak.security.principal.PrincipalImpl


        NodeUtil rootNode = new NodeUtil(root.getTree("/"), npMapper);
        rootNode.addChild(testName, JcrConstants.NT_UNSTRUCTURED);
        root.commit();

        // TODO
        testPrincipal = new PrincipalImpl("admin");
        testPrivileges = privilegesFromNames(Privilege.JCR_ADD_CHILD_NODES, Privilege.JCR_READ);
    }
View Full Code Here


        rootNode.addChild(testName, JcrConstants.NT_UNSTRUCTURED);

        root.commit();

        // TODO
        testPrincipal = new PrincipalImpl("testPrincipal");
        testPrincipal2 = new PrincipalImpl("anotherPrincipal");
    }
View Full Code Here

        testPrincipal = getTestPrincipal("testUser");
        testPrivileges = privilegesFromNames(PrivilegeConstants.JCR_ADD_CHILD_NODES, PrivilegeConstants.JCR_LOCK_MANAGEMENT);
    }

    private Principal getTestPrincipal(String name) {
        return new PrincipalImpl(name);
    }
View Full Code Here

    }

    @Ignore // TODO: principal not yet validated
    @Test
    public void testAddInvalidEntry() throws Exception {
        Principal unknownPrincipal = new PrincipalImpl("unknown");
        try {
            emptyAcl.addAccessControlEntry(unknownPrincipal, privilegesFromNames(Privilege.JCR_READ));
            fail("Adding an ACE with an unknown principal should fail");
        } catch (AccessControlException e) {
            // success
View Full Code Here

    @Override
    @Before
    public void before() throws Exception {
        super.before();

        testPrincipal = new PrincipalImpl("testPrincipal");
        testPrivileges = privilegesFromNames(PrivilegeConstants.JCR_READ, PrivilegeConstants.JCR_ADD_CHILD_NODES);
    }
View Full Code Here

        assertTrue(EveryonePrincipal.getInstance().equals(everyonePrincipal));

        java.security.acl.Group gr = (java.security.acl.Group) everyonePrincipal;
        assertFalse(gr.isMember(everyonePrincipal));
        assertTrue(gr.isMember(getTestUser(superuser).getPrincipal()));
        assertTrue(gr.isMember(new PrincipalImpl("test")));
    }
View Full Code Here

        return getQueryManager().findAuthorizables(query);
    }

    @Override
    public User createUser(final String userId, String password) throws RepositoryException {
        Principal principal = new PrincipalImpl(userId);
        return createUser(userId, password, principal, null);
    }
View Full Code Here

        return user;
    }

    @Override
    public Group createGroup(String groupId) throws RepositoryException {
        Principal principal = new PrincipalImpl(groupId);
        return createGroup(groupId, principal, null);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.security.principal.PrincipalImpl

Copyright © 2018 www.massapicom. 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.