Examples of addSpaceWithRole()


Examples of info.jtrac.domain.User.addSpaceWithRole()

        jtrac.storeSpace(s);
        User u = new User();
        u.setLoginName("test");
        u.setName("Test User");
        u.setEmail("test");
        u.addSpaceWithRole(s, "DEFAULT");
        jtrac.storeUser(u);
        Item i = new Item();
        i.setSpace(s);
        i.setAssignedTo(u);
        i.setLoggedBy(u);
View Full Code Here

Examples of info.jtrac.domain.User.addSpaceWithRole()

        // if some spaces have guest access enabled, allocate these spaces as well
        Set<Space> userSpaces = user.getSpaces();
        logger.debug("user spaces: " + userSpaces);
        for(Space s : findSpacesWhereGuestAllowed()) {
            if(!userSpaces.contains(s)) {
                user.addSpaceWithRole(s, Role.ROLE_GUEST);
               
            }
        }
        for(UserSpaceRole usr : user.getSpaceRoles()) {
            logger.debug("UserSpaceRole: " + usr);
View Full Code Here

Examples of info.jtrac.domain.User.addSpaceWithRole()

                                        " public space(s) available, initializing guest user");
                                User guestUser = new User();
                                guestUser.setLoginName("guest");
                                guestUser.setName("Guest");
                                for (Space space : spaces) {
                                    guestUser.addSpaceWithRole(space, Role.ROLE_GUEST);
                                }
                               
                                JtracSession.get().setUser(guestUser);
                                // and proceed
                                return true;
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.