A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
560 B

5 years ago
5 years ago
5 years ago
5 years ago
  1. package org.ros.chatto.service;
  2. import org.ros.chatto.model.Role;
  3. import org.ros.chatto.repository.RoleRepository;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Service;
  6. import org.springframework.transaction.annotation.Transactional;
  7. @Service
  8. @Transactional
  9. public class RoleServiceImpl implements RoleService {
  10. @Autowired
  11. private RoleRepository roleRepository;
  12. @Override
  13. @Transactional(readOnly = true)
  14. public Role getRole(String roleName) {
  15. return roleRepository.findByName(roleName);
  16. }
  17. }