Examples of grants()


Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

        checkInitialized();
        if (isAdminOrSystem(principals)) {
            return true;
        } else {
            CompiledPermissions cp = new AclPermissions(principals, false);
            return cp.grants(PathFactoryImpl.getInstance().getRootPath(), Permission.READ);
        }
    }

    //----------------------------------------------------------< protected >---
    /**
 
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

        checkInitialized();
        if (isAdminOrSystem(principals)) {
            return true;
        } else {
            CompiledPermissions cp = new CompiledPermissionImpl(principals, false);
            return cp.grants(PathFactoryImpl.getInstance().getRootPath(), Permission.READ);
        }
    }

    //-----------------------------------------------------< CompiledPolicy >---
    /**
 
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

        Path rootPath = ((SessionImpl) s).getQPath("/");
        for (Set<Principal> principals : principalSets) {
            CompiledPermissions cp = provider.compilePermissions(principals);

            assertFalse(cp.canReadAll());
            assertFalse(cp.grants(rootPath, Permission.READ));
            assertEquals(PrivilegeRegistry.NO_PRIVILEGE, cp.getPrivileges(rootPath));
            assertSame(CompiledPermissions.NO_PERMISSION, cp);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

        try {
            Set<Principal> principals = Collections.singleton(u.getPrincipal());
            cp = provider.compilePermissions(principals);

            assertTrue(cp.canReadAll());
            assertTrue(cp.grants(rootPath, Permission.READ));
            assertNotSame(CompiledPermissions.NO_PERMISSION, cp);
        } finally {

            // remove the user to assert that the path doesn't point to an
            // existing node any more -> userNode cannot be resolved any more -> permissions denied.
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

            u.remove();
            save(superuser);

            if (cp != null) {
                assertFalse(cp.canReadAll());
                assertFalse(cp.grants(rootPath, Permission.READ));
                assertEquals(PrivilegeRegistry.NO_PRIVILEGE, cp.getPrivileges(rootPath));
            }
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

            CompiledPermissions cp = p2.compilePermissions(anonymousPrincipals);
            try {
                assertEquals(CompiledPermissions.NO_PERMISSION, cp);
                assertFalse(cp.canReadAll());
                assertFalse(cp.grants(((NodeImpl) s.getRootNode()).getPrimaryPath(), Permission.READ));
            } finally {
                cp.close();
            }
        } finally {
            p2.close();
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

            CompiledPermissions cp = p2.compilePermissions(anonymousPrincipals);
            try {
                assertEquals(CompiledPermissions.NO_PERMISSION, cp);
                assertFalse(cp.canReadAll());
                assertFalse(cp.grants(((NodeImpl) s.getRootNode()).getPrimaryPath(), Permission.READ));
            } finally {
                cp.close();
            }
        } finally {
            p2.close();
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

            return true;
        } else {
            CompiledPermissions cp = new CompiledPermissionImpl(principals);
            try {
                Path rootPath = PathFactoryImpl.getInstance().getRootPath();
                return cp.grants(rootPath, Permission.READ);
            } finally {
                cp.close();
            }
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

        checkInitialized();
        if (isAdminOrSystem(principals)) {
            return true;
        } else {
            CompiledPermissions cp = new CompiledPermissionImpl(principals, false);
            return cp.grants(PathFactoryImpl.getInstance().getRootPath(), Permission.READ);
        }
    }

    //-----------------------------------------------------< CompiledPolicy >---
    /**
 
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.CompiledPermissions.grants()

        checkInitialized();
        if (isAdminOrSystem(principals)) {
            return true;
        } else {
            CompiledPermissions cp = new AclPermissions(principals, false);
            return cp.grants(PathFactoryImpl.getInstance().getRootPath(), Permission.READ);
        }
    }

    //------------------------------------------------------------< private >---
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.