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

Examples of org.apache.jackrabbit.oak.spi.security.principal.AdminPrincipal


    }

    @Override
    protected Session createAdministrativeSession(String workspace) throws RepositoryException {
        // TODO: use principal provider to retrieve admin principal
        Set<? extends Principal> principals = singleton(new AdminPrincipal() {
            @Override
            public String getName() {
                return OakSlingRepository.this.adminName;
            }
        });
View Full Code Here


     */
    @Test
    public void testAdminPrincipal() throws Exception {
        ACL acl = getApplicablePolicy(testPath);
        try {
            acl.addAccessControlEntry(new AdminPrincipal() {
                @Override
                public String getName() {
                    return "admin";
                }
            }, privilegesFromNames(PrivilegeConstants.JCR_READ));
View Full Code Here

        assertTrue(impersonation.allows(buildSubject(adminPrincipal)));
    }

    public void testAdminPrincipalAsImpersonator() throws RepositoryException, NotExecutableException {

        Principal adminPrincipal = new AdminPrincipal() {
            @Override
            public String getName() {
                return "some-admin-name";
            }
        };
View Full Code Here

    }

    @Test
    public void testGetAdminPermissions() {
        CompiledPermissions cp = pp.getCompiledPermissions(nodeStore,
                Collections.<Principal>singleton(new AdminPrincipal() {
                    @Override
                    public String getName() {
                        return "someAdminName";
                    }
                }));
View Full Code Here

        assertTrue(impersonation.allows(buildSubject(adminPrincipal)));
    }

    public void testAdminPrincipalAsImpersonator() throws RepositoryException, NotExecutableException {

        Principal adminPrincipal = new AdminPrincipal() {
            @Override
            public String getName() {
                return "some-admin-name";
            }
        };
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.security.principal.AdminPrincipal

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.