Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.Policy.check()


            boolean complied = false;
           
            for (Iterator i = this.roleIds.iterator(); i.hasNext(); ) {
                String roleId = (String) i.next();
                Role role = roleManager.getRole(roleId);
                if (policy.check(identity, role) == Policy.RESULT_GRANTED) {
                    complied = true;
                }
            }

            return complied;
View Full Code Here


            boolean complied = false;

            for (Iterator i = this.roleIds.iterator(); i.hasNext();) {
                String roleId = (String) i.next();
                Role role = roleManager.getRole(roleId);
                if (policy.check(identity, role) == Policy.RESULT_GRANTED) {
                    complied = true;
                }
            }

            return complied;
View Full Code Here

            String url) throws AccessControlException {
        Role[] roles = accreditableManager.getRoleManager().getRoles();
        Set grantedRoles = new HashSet();
        Policy policy = getPolicy(accreditableManager, url);
        for (int i = 0; i < roles.length; i++) {
            if (policy.check(identity, roles[i]) == Policy.RESULT_GRANTED) {
                grantedRoles.add(roles[i]);
            }
        }
        return (Role[]) grantedRoles.toArray(new Role[grantedRoles.size()]);
    }
View Full Code Here

            String url) throws AccessControlException {
        Role[] roles = accreditableManager.getRoleManager().getRoles();
        Set grantedRoles = new HashSet();
        Policy policy = getPolicy(accreditableManager, url);
        for (int i = 0; i < roles.length; i++) {
            if (policy.check(identity, roles[i]) == Policy.RESULT_GRANTED) {
                grantedRoles.add(roles[i]);
            }
        }
        return (Role[]) grantedRoles.toArray(new Role[grantedRoles.size()]);
    }
View Full Code Here

       
        Role[] allRoles = getAccreditableManager().getRoleManager().getRoles();
       
        getLogger().info("Roles: ");
        for (int i = 0; i < allRoles.length; i++) {
            int result = policy.check(getIdentity(), allRoles[i]);
            if (result == Policy.RESULT_GRANTED) {
                getLogger().info(allRoles[i].getId() + ": granted");
            }
            else {
                getLogger().info(allRoles[i].getId() + ": denied");
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.