Examples of loginAs()


Examples of jeeves.server.UserSession.loginAs()

        }

        // todo reject if < useradmin ?

        UserSession session = new UserSession();
        session.loginAs(user);
        this.context.setUserSession(session);

        this.context.setIpAddress(null);
    }
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        _userRepo.save(UserRepositoryTest.newUser(inc));

        final ServiceContext serviceContext = createServiceContext();
        UserSession userSession = new UserSession();
        userSession.loginAs(editor);
        serviceContext.setUserSession(userSession);
        final UserList response = listService.exec();

        java.util.List<JAXBElement<? extends User>> records = response.getUsers();
        assertEquals("Expected to find a record.", 1, records.size());
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        _userGroupRepo.save(new UserGroup().setGroup(group).setUser(user1).setProfile(Profile.Editor));
        _userGroupRepo.save(new UserGroup().setGroup(group).setUser(user2).setProfile(Profile.RegisteredUser));

        final ServiceContext serviceContext = createServiceContext();
        UserSession userSession = new UserSession();
        userSession.loginAs(user1);

        serviceContext.setUserSession(userSession);
        final UserList response = listService.exec();

        java.util.List<?> records = response.getUsers();
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        final Update update = new Update();

        ServiceContext context = createServiceContext();
        final UserSession userSession = new UserSession();
        userSession.loginAs(startUser);
        context.setUserSession(userSession);

        Element request = new Element("request")
                .addContent(new Element(Params.ID).setText(""+startUser.getId()))
                .addContent(new Element(Params.PASSWORD).setText("password"))
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        final Update update = new Update();

        ServiceContext context = createServiceContext();
        final UserSession userSession = new UserSession();
        userSession.loginAs(startUser);
        context.setUserSession(userSession);

        Element request = new Element("request")
                .addContent(new Element(Params.ID).setText(""+startUser.getId()))
                .addContent(new Element(Params.NAME).setText("firstname"))
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        final Update update = new Update();

        ServiceContext context = createServiceContext();
        final UserSession userSession = new UserSession();
        userSession.loginAs(updatingUser);
        context.setUserSession(userSession);

        Element request = new Element("request")
                .addContent(new Element(Params.ID).setText(""+toUpdateUser.getId()))
                .addContent(new Element(Params.PROFILE).setText(Profile.Administrator.name()))
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        final Update update = new Update();

        ServiceContext context = createServiceContext();
        final UserSession userSession = new UserSession();
        userSession.loginAs(startUser);
        context.setUserSession(userSession);

        Element request = new Element("request")
                .addContent(new Element(Params.NAME).setText("newname"))
                .addContent(new Element(Params.ID).setText(""+startUser.getId()))
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        final Update update = new Update();

        ServiceContext context = createServiceContext();
        final UserSession userSession = new UserSession();
        userSession.loginAs(updatingUser);
        context.setUserSession(userSession);

        Element request = new Element("request")
                .addContent(new Element(Params.PASSWORD).setText("password"))
                .addContent(new Element(Params.ID).setText("" + toUpdateUser.getId()))
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        final Update update = new Update();

        ServiceContext context = createServiceContext();
        final UserSession userSession = new UserSession();
        userSession.loginAs(updatingUser);
        context.setUserSession(userSession);

        Element request = new Element("request")
                .addContent(new Element(Params.PASSWORD).setText("password"))
                .addContent(new Element(Params.ID).setText("" + toUpdateUser.getId()))
View Full Code Here

Examples of jeeves.server.UserSession.loginAs()

        final Update update = new Update();

        ServiceContext context = createServiceContext();
        final UserSession userSession = new UserSession();
        userSession.loginAs(updatingUser);
        context.setUserSession(userSession);

        Element request = new Element("request")
                .addContent(new Element(Params.PASSWORD).setText("password"))
                .addContent(new Element(Params.ID).setText("" + toUpdateUser.getId()))
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.