Package org.jboss.seam.wiki.core.model

Examples of org.jboss.seam.wiki.core.model.Role$AccessLevel


    }

    private void setRolesAndAccessLevels(User user) {

        // We don't use Seams Role class, wiki currently only uses numeric access levels
        Role bestRole = (Role)Component.getInstance("guestRole");
        for (Role role : user.getRoles()) {
            if (role.getAccessLevel() > bestRole.getAccessLevel()) bestRole = role;
        }

        if (user.getMemberHome() != null && user.getMemberHome().getName() != null) {
            log.debug("initializing users member home instance before detaching currentUser into HTTP session");
        }

        // Outject current user and access level
        Contexts.getSessionContext().set("currentUser", user);
        Contexts.getSessionContext().set("currentAccessLevel", bestRole.getAccessLevel());

    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.model.Role$AccessLevel

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.