示例#1
0
 public void changeUserPrivileges(int privilegesId, int id) {
   Users user = usersDAO.get(id);
   user.setPrivilegesByPrivilegeId(privilegesDAO.get(privilegesId));
   usersDAO.update(user);
   logger.info(
       "User's privileges changed successfully in method changeUserPrivileges() in class UsersServices");
 }
示例#2
0
 public void addUser(
     int privilegeId,
     String login,
     String password,
     String email,
     String firstName,
     String lastName) {
   Users user = new Users();
   user.setLogin(login);
   user.setPassword(password);
   user.setEmail(email);
   user.setFirstName(firstName);
   user.setLastName(lastName);
   user.setPrivilegesByPrivilegeId(privilegesDAO.get(privilegeId));
   usersDAO.create(user);
   logger.info("User added successfully in method addUser() in class UsersServices");
 }
示例#3
0
 public void editUserInfo(
     int id,
     String login,
     String password,
     String email,
     String firstName,
     String lastName,
     Integer privilegeId) {
   Users user = usersDAO.get(id);
   user.setLogin(login);
   user.setPassword(password);
   user.setEmail(email);
   user.setFirstName(firstName);
   user.setLastName(lastName);
   user.setPrivilegesByPrivilegeId(privilegesDAO.get(privilegeId));
   usersDAO.update(user);
   logger.info("User's info changed successfully in method editUserInfo() in class UsersServices");
 }