Package ch.inftec.ju.db.auth.repo

Examples of ch.inftec.ju.db.auth.repo.AuthUserRepo.save()


    // Check if the role has already been assigned to the user
    if (roleRepo.getByNameAndUsersId(roleName, user.getId()) == null) {
      // Role hasn't been assigned, so do it
      user.getRoles().add(role);
      role.getUsers().add(user);
      userRepo.save(user);
      roleRepo.save(role);
    }
  }
 
  /**
 
View Full Code Here


      if (roleRepo.getByNameAndUsersId(roleName, user.getId()) != null) {
        // User has role assigned, so remove it
        role.getUsers().remove(user);
        user.getRoles().remove(role);
        roleRepo.save(role);
        userRepo.save(user);
      }
    }
  }
}
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.