1
0

test alignment and code cleanup

This commit is contained in:
Michael Hoennig
2022-08-05 15:39:23 +02:00
parent f16953877f
commit 86128f5994
6 changed files with 201 additions and 68 deletions

View File

@ -2,7 +2,6 @@ package net.hostsharing.hsadminng.hs.hscustomer;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.Optional;
@ -14,7 +13,7 @@ public interface CustomerRepository extends Repository<CustomerEntity, UUID> {
Optional<CustomerEntity> findByUuid(UUID id);
@Query("SELECT c FROM CustomerEntity c WHERE :prefix is null or c.prefix like concat(:prefix, '%')")
List<CustomerEntity> findCustomerByOptionalPrefixLike(@Param("prefix") String prefix);
List<CustomerEntity> findCustomerByOptionalPrefixLike(String prefix);
CustomerEntity save(final CustomerEntity entity);

View File

@ -2,7 +2,6 @@ package net.hostsharing.hsadminng.rbac.rbacuser;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.UUID;
@ -13,5 +12,5 @@ public interface RbacUserRepository extends Repository<RbacUserEntity, UUID> {
List<RbacUserEntity> findByOptionalNameLike(final String userName);
@Query(value = "SELECT * FROM grantedPermissions(:userName)", nativeQuery = true)
List<RbacUserPermission> findPermissionsOfUser(@Param("userName") String userName);
List<RbacUserPermission> findPermissionsOfUser(String userName);
}