Examples of User


Examples of com.sparc.knappsack.components.entities.User

    @Test
    public void testValid() {
        groupForm.setName("name");

        User user = new User();
        Organization organization = new Organization();
        organization.setId(1L);
        user.setActiveOrganization(organization);

        Mockito.when(mockUserService.getUserFromSecurityContext()).thenReturn(user);
        Mockito.when(mockGroupService.get(groupForm.getName(), user.getActiveOrganization().getId())).thenReturn(null);

        validator.validate(groupForm, errors);

        assertFalse(errors.hasErrors());
    }
View Full Code Here

Examples of com.sslexplorer.security.User

        }
        ChapUtil chapUtil = new ChapUtil();
        if(radiusAuthenticate(rc, chapUtil, username, password)){
            log.debug("RADIUS Validation SUCCEEDED!");
            try {
                User user = CoreServlet.getServlet().getUserDatabase().getAccount(null, username);
                return user;
            } catch (Exception e) {
                throw new UserDatabaseException("Failed to get user account.", e);
            }
        }else{
View Full Code Here

Examples of com.starbase.starteam.User

     *
     * @param userID a user's ID
     * @return the name of the user with ID userID
     */
    protected final String getUserName(int userID) {
        User u = this.server.getUser(userID);
        if (null == u) {
            return "";
        }
        return u.getName();
    }
View Full Code Here

Examples of com.steeplesoft.frenchpress.model.User

    @Test
    public void userCrud() {
        List<User> users = userService.getUsers();
        assertNotNull(users);

        User adminUser = testCreateUser("Administrator");
        User regularUser = testCreateUser("User");
        testUpdateUser(adminUser);
        testDeleteUser(adminUser, regularUser);
    }
View Full Code Here

Examples of com.stormpath.samples.todos.entity.User

    //simulate a single User for the demo:
    private final User user;

    public DefaultTodoService() {
        //simulate a single User for this demo:
        User user = new User();
        user.setId(UUID.randomUUID().toString().replace("-", ""));
        user.setUsername("jsmith");
        user.setGivenName("John");
        user.setSurname("Smith");
        this.user = user;
    }
View Full Code Here

Examples of com.stormpath.tooter.model.User

        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "change.password.required.password", "Field password is required");

        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "confirmPassword", "change.password.required.confirm.password", "Field confirm password is required");

        User customer = (User) o;

        if (!customer.getPassword().equals(customer.getConfirmPassword())) {
            errors.rejectValue("password", "password.not.match");
        }
    }
View Full Code Here

Examples of com.streamreduce.core.model.User

                .url("http://nodeable.com")
                .description("Nodeable Test Account")
                .name("Nodeable Testing")
                .build();

        User testUser = new User.Builder()
                .account(testAccount)
                .accountLocked(false)
                .accountOriginator(true)
                .fullname("Nodeable Test User")
                .username("test_user_" + new Date().getTime() + "@nodeable.com")
View Full Code Here

Examples of com.stripbandunk.tutorial.simpleapp.entity.User

        Group group = new Group("Sample Group");
        group.setCreatedDate(new Date());
        group.setLastModifiedDate(new Date());
        groupRepository.save(group);

        User user = new User();
        user.setAddress("Address");
        user.setBirthDate(new Date());
        user.setEmail("echo.khannedy@gmail.com");
        user.setFirstName("Eko Kurniawan");
        user.setLastName("Khannedy");
        user.setCreatedDate(new Date());
        user.setLastModifiedDate(new Date());
        user.setGroup(group);

        repository.save(user);

        long edit = user.getLastModifiedDate().getTime();

        user.setAddress("Address Edit");
        user.setFirstName("Nesia");
        user.setLastName("Oktiana");

        controller.processEdit(user);

        if (edit == user.getLastModifiedDate().getTime()) {
            Assert.fail();
        }

        repository.deleteAll();
        groupRepository.deleteAll();
View Full Code Here

Examples of com.sugar.users.User

   
    public void doFilter (ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        final HttpServletRequest req = (HttpServletRequest) request;
        final HttpServletResponse resp = (HttpServletResponse) response;
       
        final User user = (User) req.getSession().getAttribute ("user");
       
        if (true == user.isNewUser()) {
            req.getSession().setAttribute("errorText", "An access is denied. Login to the system first.");
            resp.sendRedirect("../error.jsp");
        } else {
            if (false == user.isAdmin()) {
                req.getSession().setAttribute("errorText", "This user is not allowed to visit this restricted area.");
                resp.sendRedirect("../error.jsp");
            } else {
                chain.doFilter (request, response);
            }
View Full Code Here

Examples of com.sun.enterprise.security.auth.realm.User

   
    public Map<String,Object> getUserAttributes(final String realmName, final String username)
    {
        try
        {
            final User user = getRealm(realmName).getUser(username);
            final Map<String,Object> m = new HashMap<String,Object>();
            final List<String> attrNames = ListUtil.newList(user.getAttributeNames());
            for( final String attrName : attrNames )
            {
                m.put( attrName, user.getAttribute(attrName) );
            }
            return m;
        }
        catch( final Exception e )
        {
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.