Package org.apache.lenya.cms.ac

Examples of org.apache.lenya.cms.ac.Role


     * @param situation The situation to check.
     * @return if the condition is complied.
     */
        public boolean isComplied(Situation situation) {
        User user = situation.getUser();
        Role userRoles[] = user.getRoles();
       
        Role conditionRole = new Role(getExpression().trim());
       
        boolean complied = false;
        for (int i = 0; i < userRoles.length; i++) {
            if (conditionRole.equals(userRoles[i])) {
                complied = true;
            }
        }
        return complied;
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.ac.Role

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.