Package org.internna.ossmoney.model.security

Examples of org.internna.ossmoney.model.security.Authority


    createUser(username, password, name, email, createDashBoDashboard());
    logger.info("Registered new user[" + username + "]");
  }

  protected UserDetails createUser(String username, String password, String name, String email, Dashboard dashboard) {
    Authority authority = Authority.findByName(Authority.ROLE_USER);
    UserDetails user = new UserDetails();
    user.setSalt(salt);
    user.setName(name);
    user.setEmail(email);
    user.setUsername(username);
    user.setPassword(password);
    user.setDashboard(dashboard);
    user.setEnabled(Boolean.TRUE);
    user.getRoles().add(authority);
    authority.getUsers().add(user);
    user.persist();
    adminService.createPayee(user, user.getName());
    createSubcategories(user);
    user.setBudget(createBudget(user));
    if (createBasicSpanishFinancialInstitutions) {
      createBasicSpanishInstitutions(user);
    }
    authority.merge();
    user.merge();
    return user;
  }
View Full Code Here

TOP

Related Classes of org.internna.ossmoney.model.security.Authority

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.