real rbac-entities in booking+hosting #89

Merged
hsh-michaelhoennig merged 15 commits from real-and-rbac-entities-everywhere into master 2024-08-21 06:18:38 +02:00
5 changed files with 4 additions and 27 deletions
Showing only changes of commit 21f25ed888 - Show all commits

View File

@ -101,21 +101,6 @@ public abstract class HsBookingItem implements Stringifyable, BaseEntity<HsBooki
@JoinColumn(name = "parentitemuuid", referencedColumnName = "uuid")
private List<HsBookingItemRealEntity> subBookingItems;
// FIXME
// @OneToOne(targetEntity = HsHostingAssetRealEntity.class, mappedBy="bookingItem") // does not work in case of subclass HsBookingItemRbacEntity
// // because that bookingItem refers to a HsBookingItemRealEntity, not ...Rbac...
// @OneToOne(fetch = FetchType.LAZY)
// @JoinFormula(
// referencedColumnName = "uuid",
// value = """
// (
// SELECT DISTINCT asset.uuid
// FROM hs_hosting_asset asset
// WHERE asset.uuid=uuid
// )
// """)
// private HsHostingAssetRealEntity relatedHostingAsset;
@Transient
private PatchableMapWrapper<Object> resourcesWrapper;

View File

@ -1,6 +1,6 @@
package net.hostsharing.hsadminng.hs.booking.item.validators;
import net.hostsharing.hsadminng.hs.booking.EntityManagerMock;
import net.hostsharing.hsadminng.hs.hosting.asset.EntityManagerMock;
import net.hostsharing.hsadminng.hs.booking.debitor.HsBookingDebitorEntity;
import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemRealEntity;
import net.hostsharing.hsadminng.hs.booking.project.HsBookingProjectRealEntity;
@ -20,7 +20,7 @@ import static java.util.Arrays.stream;
import static java.util.List.of;
import static java.util.Map.entry;
import static java.util.Map.ofEntries;
import static net.hostsharing.hsadminng.hs.booking.EntityManagerMock.createEntityManagerMockWithAssetQueryFake;
import static net.hostsharing.hsadminng.hs.hosting.asset.EntityManagerMock.createEntityManagerMockWithAssetQueryFake;
import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.CLOUD_SERVER;
import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.MANAGED_SERVER;
import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.MANAGED_WEBSPACE;

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.booking;
package net.hostsharing.hsadminng.hs.hosting.asset;
import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetRealEntity;
import org.jetbrains.annotations.NotNull;
import jakarta.persistence.EntityManager;

View File

@ -11,7 +11,6 @@ import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType;
import net.hostsharing.hsadminng.hs.booking.project.HsBookingProjectRealRepository;
import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactRealEntity;
import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactRealRepository;
import net.hostsharing.hsadminng.hs.office.debitor.HsOfficeDebitorRepository;
import net.hostsharing.hsadminng.rbac.test.ContextBasedTestWithCleanup;
import net.hostsharing.hsadminng.rbac.test.JpaAttempt;
import org.junit.jupiter.api.ClassOrderer;
@ -53,18 +52,12 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
@Autowired
HsHostingAssetRealRepository realAssetRepo;
@Autowired
HsHostingAssetRbacRepository rbacAssetRepo; // FIXME: remove?
@Autowired
HsBookingItemRealRepository realBookingItemRepo;
@Autowired
HsBookingProjectRealRepository realProjectRepo;
@Autowired
HsOfficeDebitorRepository debitorRepo; // FIXME: remove?
@Autowired
HsOfficeContactRealRepository realContactRepo;

View File

@ -1,6 +1,6 @@
package net.hostsharing.hsadminng.hs.hosting.asset.validators;
import net.hostsharing.hsadminng.hs.booking.EntityManagerMock;
import net.hostsharing.hsadminng.hs.hosting.asset.EntityManagerMock;
import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemRealEntity;
import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType;
import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetRbacEntity;