cleanup, clarify, re-categorize and fix some TODO.spec issues

This commit is contained in:
Michael Hoennig 2024-04-30 09:28:00 +02:00
parent e7df0bfd4d
commit 5798a99885
6 changed files with 8 additions and 8 deletions

View File

@ -170,7 +170,7 @@ public class HsOfficeDebitorEntity implements RbacObject, Stringifyable {
"vatCountryCode",
"vatBusiness",
"vatReverseCharge",
"defaultPrefix" /* TODO.spec: do we want that updatable? */)
"defaultPrefix")
.toRole("global", ADMIN).grantPermission(INSERT)
.importRootEntityAliasProxy("debitorRel", HsOfficeRelationEntity.class, usingCase(DEBITOR),

View File

@ -142,7 +142,7 @@ public class HsOfficeRelationEntity implements RbacObject, Stringifyable {
with.permission(UPDATE);
})
.createSubRole(AGENT, (with) -> {
// TODO.spec: we need relation:PROXY, to allow changing the relation contact.
// TODO.rbac: we need relation:PROXY, to allow changing the relation contact.
// the alternative would be to move this to the relation:ADMIN role,
// but then the partner holder person could update the partner relation itself,
// see partner entity.

View File

@ -63,7 +63,7 @@ begin
insert
into RbacGrants (grantedByRoleUuid, ascendantUuid, descendantUuid, assumed)
values (grantedByRoleUuid, userUuid, grantedRoleUuid, doAssume);
-- TODO.spec: What should happen on mupltiple grants? What if options (doAssume) are not the same?
-- TODO.impl: What should happen on mupltiple grants? What if options (doAssume) are not the same?
-- Most powerful or latest grant wins? What about managed?
-- on conflict do nothing; -- allow granting multiple times
end; $$;

View File

@ -52,7 +52,7 @@ begin
if cardinality(userUuids) > 0 then
-- direct grants to users need a grantedByRole which can revoke the grant
if grantedByRole is null then
userGrantsByRoleUuid := roleUuid; -- TODO.spec: or do we want to require an explicit userGrantsByRoleUuid?
userGrantsByRoleUuid := roleUuid; -- TODO.impl: or do we want to require an explicit userGrantsByRoleUuid?
else
userGrantsByRoleUuid := getRoleId(grantedByRole);
end if;

View File

@ -11,7 +11,7 @@ create table hs_office_debitor
debitorNumberSuffix char(2) not null check (debitorNumberSuffix::text ~ '^[0-9][0-9]$'),
debitorRelUuid uuid not null references hs_office_relation(uuid),
billable boolean not null default true,
vatId varchar(24), -- TODO.spec: here or in person?
vatId varchar(24),
vatCountryCode varchar(2),
vatBusiness boolean not null,
vatReverseCharge boolean not null,

View File

@ -810,7 +810,7 @@ public class ImportOfficeData extends ContextBasedTest {
)
.shareCount(rec.getInteger("quantity"))
.comment( rec.getString("comment"))
.reference("legacy data import") // TODO.spec: or use value from comment column?
.reference(member.getMemberNumber().toString())
.build();
if (shareTransaction.getTransactionType() == HsOfficeCoopSharesTransactionType.ADJUSTMENT) {
@ -867,7 +867,7 @@ public class ImportOfficeData extends ContextBasedTest {
.transactionType(assetTypeMapping.get(rec.getString("action")))
.assetValue(rec.getBigDecimal("amount"))
.comment(rec.getString("comment"))
.reference("legacy data import") // TODO.spec: or use value from comment column?
.reference("legacy data import") // TODO.: Kundennummer
.build();
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.ADJUSTMENT) {
@ -1092,7 +1092,7 @@ public class ImportOfficeData extends ContextBasedTest {
contactRecord.getString("first_name"),
contactRecord.getString("last_name"),
contactRecord.getString("firma")));
contact.setEmailAddresses(contactRecord.getString("email"));
contact.putEmailAdresses( Map.of("main", contactRecord.getString("email")));
contact.setPostalAddress(toAddress(contactRecord));
contact.setPhoneNumbers(toPhoneNumbers(contactRecord));