introduce-booking-project-and-nested-booking-items #57
@ -25,7 +25,7 @@ create table if not exists hs_booking_item
|
||||
resources jsonb not null,
|
||||
|
||||
constraint chk_hs_booking_item_has_project_or_parent_asset
|
||||
check (type in ('CLOUD_SERVER', 'MANAGED_SERVER') or projectUuid is not null or parentItemUuid is not null)
|
||||
check (projectUuid is not null or parentItemUuid is not null)
|
||||
);
|
||||
--//
|
||||
|
||||
|
@ -32,7 +32,7 @@ create table if not exists hs_hosting_asset
|
||||
config jsonb not null,
|
||||
|
||||
constraint chk_hs_hosting_asset_has_booking_item_or_parent_asset
|
||||
check (type in ('CLOUD_SERVER', 'MANAGED_SERVER') or bookingItemUuid is not null or parentAssetUuid is not null)
|
||||
check (bookingItemUuid is not null or parentAssetUuid is not null)
|
||||
);
|
||||
--//
|
||||
|
||||
|
@ -222,7 +222,6 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
|
||||
final var location = RestAssured // @formatter:off
|
||||
.given()
|
||||
//.header("current-user", "superuser-alex@hostsharing.net", "hs_hosting_asset#"+givenParentAsset.getIdentifier()+":ADMIN")
|
||||
.header("current-user", "superuser-alex@hostsharing.net")
|
||||
hsh-michaelhoennig marked this conversation as resolved
|
||||
.header("assumed-roles", "hs_hosting_asset#vm1011:ADMIN")
|
||||
.contentType(ContentType.JSON)
|
||||
|
@ -41,11 +41,6 @@ public class RawRbacRoleEntity {
|
||||
@NotNull
|
||||
public static List<String> distinctRoleNamesOf(@NotNull final List<RawRbacRoleEntity> roles) {
|
||||
// TODO: remove .distinct() once partner.person + partner.contract are removed
|
||||
roles.forEach(r -> {
|
||||
if (r.getRoleName() == null) {
|
||||
r.toString();
|
||||
}
|
||||
});
|
||||
return roles.stream().map(RawRbacRoleEntity::getRoleName).sorted().distinct().toList();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user
kann weg