Package org.jmanage.core.auth

Examples of org.jmanage.core.auth.Role


    private User buildUser(ActionForm form){
        UserForm userForm = (UserForm)form;
        List<Role> roles = new ArrayList<Role>(1);
        String[] rolesString = userForm.getRole();
        for(int ctr=0; ctr < rolesString.length; ctr++){
          roles.add(new Role(rolesString[ctr]));
        }
        User user = new User(userForm.getUsername(), Crypto.hash(userForm.getPassword()),
                roles, userForm.getStatus(), 0);
        return user;
    }
View Full Code Here


        assert user != null;

        List<Role> roles = new ArrayList<Role>(1);
        String[] rolesString = userForm.getRole();
        for(int ctr=0; ctr < rolesString.length; ctr++){
          roles.add(new Role(rolesString[ctr]));
        }
        user.setRoles(roles);
        if(!userForm.getPassword().equals(UserForm.FORM_PASSWORD)){
            String hashedPassword = Crypto.hash(userForm.getPassword());
            user.setPassword(hashedPassword);
View Full Code Here

TOP

Related Classes of org.jmanage.core.auth.Role

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.