cleanup after code review

This commit is contained in:
Michael Hoennig 2024-06-03 14:44:59 +02:00
parent 6151a25136
commit 60bddf7878
4 changed files with 2 additions and 8 deletions

View File

@ -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)
);
--//

View File

@ -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)
);
--//

View File

@ -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")
.header("assumed-roles", "hs_hosting_asset#vm1011:ADMIN")
.contentType(ContentType.JSON)

View File

@ -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();
}