introduce-booking-project-and-nested-booking-items #57

Merged
hsh-michaelhoennig merged 6 commits from introduce-booking-project-and-nested-booking-items into master 2024-06-03 14:45:29 +02:00
4 changed files with 4 additions and 4 deletions
Showing only changes of commit 6151a25136 - Show all commits

View File

@ -162,10 +162,10 @@ public class HsBookingItemEntity implements Stringifyable, RbacObject, Validatab
public static RbacView rbac() {
return rbacViewFor("bookingItem", HsBookingItemEntity.class)
.withIdentityView(SQL.projection("caption")) // FIXME: cleanIdentifier(...)?
.withIdentityView(SQL.projection("caption"))
.withRestrictedViewOrderBy(SQL.expression("validity"))
.withUpdatableColumns("version", "caption", "validity", "resources")
.toRole("global", ADMIN).grantPermission(INSERT) // FIXME: Why is this necessary to insert test data?
.toRole("global", ADMIN).grantPermission(INSERT) // TODO.impl: Why is this necessary to insert test data?
.toRole("global", ADMIN).grantPermission(DELETE)
.importEntityAlias("project", HsBookingProjectEntity.class, usingDefaultCase(),

View File

@ -136,7 +136,7 @@ public class HsHostingAssetEntity implements Stringifyable, RbacObject, Validata
.withIdentityView(SQL.projection("identifier"))
.withRestrictedViewOrderBy(SQL.expression("identifier"))
.withUpdatableColumns("version", "caption", "config")
.toRole(GLOBAL, ADMIN).grantPermission(INSERT) // FIXME: Why is this necessary to insert test data?
.toRole(GLOBAL, ADMIN).grantPermission(INSERT) // TODO.impl: Why is this necessary to insert test data?
.importEntityAlias("bookingItem", HsBookingItemEntity.class, usingDefaultCase(),
dependsOnColumn("bookingItemUuid"),

View File

@ -178,7 +178,6 @@ class HsHostingAssetRepositoryIntegrationTest extends ContextBasedTestWithCleanu
public void normalUser_canViewOnlyRelatedAsset() {
// given:
context("person-FirbySusan@example.com");
// context("superuser-alex@hostsharing.net"); // FIXME
final var projectUuid = projectRepo.findAll().stream()
.filter(p -> p.getCaption().equals("D-1000111 default project"))
.findAny().orElseThrow().getUuid();

View File

@ -623,6 +623,7 @@ public class ImportOfficeData extends ContextBasedTest {
context(rbacSuperuser);
em.createNativeQuery("delete from hs_hosting_asset where true").executeUpdate();
em.createNativeQuery("delete from hs_booking_item where true").executeUpdate();
em.createNativeQuery("delete from hs_booking_project where true").executeUpdate();
em.createNativeQuery("delete from hs_office_coopassetstransaction where true").executeUpdate();
em.createNativeQuery("delete from hs_office_coopassetstransaction_legacy_id where true").executeUpdate();
em.createNativeQuery("delete from hs_office_coopsharestransaction where true").executeUpdate();