cleanup, clarify, re-categorize and fix some TODO.spec issues
This commit is contained in:
parent
e7df0bfd4d
commit
5798a99885
@ -170,7 +170,7 @@ public class HsOfficeDebitorEntity implements RbacObject, Stringifyable {
|
|||||||
"vatCountryCode",
|
"vatCountryCode",
|
||||||
"vatBusiness",
|
"vatBusiness",
|
||||||
"vatReverseCharge",
|
"vatReverseCharge",
|
||||||
"defaultPrefix" /* TODO.spec: do we want that updatable? */)
|
"defaultPrefix")
|
||||||
.toRole("global", ADMIN).grantPermission(INSERT)
|
.toRole("global", ADMIN).grantPermission(INSERT)
|
||||||
|
|
||||||
.importRootEntityAliasProxy("debitorRel", HsOfficeRelationEntity.class, usingCase(DEBITOR),
|
.importRootEntityAliasProxy("debitorRel", HsOfficeRelationEntity.class, usingCase(DEBITOR),
|
||||||
|
@ -142,7 +142,7 @@ public class HsOfficeRelationEntity implements RbacObject, Stringifyable {
|
|||||||
with.permission(UPDATE);
|
with.permission(UPDATE);
|
||||||
})
|
})
|
||||||
.createSubRole(AGENT, (with) -> {
|
.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,
|
// the alternative would be to move this to the relation:ADMIN role,
|
||||||
// but then the partner holder person could update the partner relation itself,
|
// but then the partner holder person could update the partner relation itself,
|
||||||
// see partner entity.
|
// see partner entity.
|
||||||
|
@ -63,7 +63,7 @@ begin
|
|||||||
insert
|
insert
|
||||||
into RbacGrants (grantedByRoleUuid, ascendantUuid, descendantUuid, assumed)
|
into RbacGrants (grantedByRoleUuid, ascendantUuid, descendantUuid, assumed)
|
||||||
values (grantedByRoleUuid, userUuid, grantedRoleUuid, doAssume);
|
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?
|
-- Most powerful or latest grant wins? What about managed?
|
||||||
-- on conflict do nothing; -- allow granting multiple times
|
-- on conflict do nothing; -- allow granting multiple times
|
||||||
end; $$;
|
end; $$;
|
||||||
|
@ -52,7 +52,7 @@ begin
|
|||||||
if cardinality(userUuids) > 0 then
|
if cardinality(userUuids) > 0 then
|
||||||
-- direct grants to users need a grantedByRole which can revoke the grant
|
-- direct grants to users need a grantedByRole which can revoke the grant
|
||||||
if grantedByRole is null then
|
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
|
else
|
||||||
userGrantsByRoleUuid := getRoleId(grantedByRole);
|
userGrantsByRoleUuid := getRoleId(grantedByRole);
|
||||||
end if;
|
end if;
|
||||||
|
@ -11,7 +11,7 @@ create table hs_office_debitor
|
|||||||
debitorNumberSuffix char(2) not null check (debitorNumberSuffix::text ~ '^[0-9][0-9]$'),
|
debitorNumberSuffix char(2) not null check (debitorNumberSuffix::text ~ '^[0-9][0-9]$'),
|
||||||
debitorRelUuid uuid not null references hs_office_relation(uuid),
|
debitorRelUuid uuid not null references hs_office_relation(uuid),
|
||||||
billable boolean not null default true,
|
billable boolean not null default true,
|
||||||
vatId varchar(24), -- TODO.spec: here or in person?
|
vatId varchar(24),
|
||||||
vatCountryCode varchar(2),
|
vatCountryCode varchar(2),
|
||||||
vatBusiness boolean not null,
|
vatBusiness boolean not null,
|
||||||
vatReverseCharge boolean not null,
|
vatReverseCharge boolean not null,
|
||||||
|
@ -810,7 +810,7 @@ public class ImportOfficeData extends ContextBasedTest {
|
|||||||
)
|
)
|
||||||
.shareCount(rec.getInteger("quantity"))
|
.shareCount(rec.getInteger("quantity"))
|
||||||
.comment( rec.getString("comment"))
|
.comment( rec.getString("comment"))
|
||||||
.reference("legacy data import") // TODO.spec: or use value from comment column?
|
.reference(member.getMemberNumber().toString())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
if (shareTransaction.getTransactionType() == HsOfficeCoopSharesTransactionType.ADJUSTMENT) {
|
if (shareTransaction.getTransactionType() == HsOfficeCoopSharesTransactionType.ADJUSTMENT) {
|
||||||
@ -867,7 +867,7 @@ public class ImportOfficeData extends ContextBasedTest {
|
|||||||
.transactionType(assetTypeMapping.get(rec.getString("action")))
|
.transactionType(assetTypeMapping.get(rec.getString("action")))
|
||||||
.assetValue(rec.getBigDecimal("amount"))
|
.assetValue(rec.getBigDecimal("amount"))
|
||||||
.comment(rec.getString("comment"))
|
.comment(rec.getString("comment"))
|
||||||
.reference("legacy data import") // TODO.spec: or use value from comment column?
|
.reference("legacy data import") // TODO.: Kundennummer
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.ADJUSTMENT) {
|
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.ADJUSTMENT) {
|
||||||
@ -1092,7 +1092,7 @@ public class ImportOfficeData extends ContextBasedTest {
|
|||||||
contactRecord.getString("first_name"),
|
contactRecord.getString("first_name"),
|
||||||
contactRecord.getString("last_name"),
|
contactRecord.getString("last_name"),
|
||||||
contactRecord.getString("firma")));
|
contactRecord.getString("firma")));
|
||||||
contact.setEmailAddresses(contactRecord.getString("email"));
|
contact.putEmailAdresses( Map.of("main", contactRecord.getString("email")));
|
||||||
contact.setPostalAddress(toAddress(contactRecord));
|
contact.setPostalAddress(toAddress(contactRecord));
|
||||||
contact.setPhoneNumbers(toPhoneNumbers(contactRecord));
|
contact.setPhoneNumbers(toPhoneNumbers(contactRecord));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user