memberNumber as partnerNumber+memberNumberSuffix #13
@ -9,8 +9,6 @@ import net.hostsharing.hsadminng.rbac.rbacgrant.RawRbacGrantRepository;
|
|||||||
import net.hostsharing.hsadminng.rbac.rbacrole.RawRbacRoleRepository;
|
import net.hostsharing.hsadminng.rbac.rbacrole.RawRbacRoleRepository;
|
||||||
import net.hostsharing.test.Array;
|
import net.hostsharing.test.Array;
|
||||||
import net.hostsharing.test.JpaAttempt;
|
import net.hostsharing.test.JpaAttempt;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
|
||||||
import org.junit.jupiter.api.Nested;
|
import org.junit.jupiter.api.Nested;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
|
@ -143,7 +143,7 @@ class HsOfficeMembershipControllerAcceptanceTest {
|
|||||||
.contentType(ContentType.JSON)
|
.contentType(ContentType.JSON)
|
||||||
.body("uuid", isUuidValid())
|
.body("uuid", isUuidValid())
|
||||||
.body("mainDebitor.debitorNumber", is(givenDebitor.getDebitorNumber()))
|
.body("mainDebitor.debitorNumber", is(givenDebitor.getDebitorNumber()))
|
||||||
// .body("mainDebitor.debitorNumber", is(givenDebitor.getDebitorNumberSuffix()))
|
.body("mainDebitor.debitorNumberSuffix", is((int) givenDebitor.getDebitorNumberSuffix()))
|
||||||
.body("partner.person.tradeName", is("Third OHG"))
|
.body("partner.person.tradeName", is("Third OHG"))
|
||||||
.body("memberNumber", is(20001))
|
.body("memberNumber", is(20001))
|
||||||
.body("validFrom", is("2022-10-13"))
|
.body("validFrom", is("2022-10-13"))
|
||||||
@ -278,7 +278,7 @@ class HsOfficeMembershipControllerAcceptanceTest {
|
|||||||
.body("uuid", isUuidValid())
|
.body("uuid", isUuidValid())
|
||||||
.body("partner.person.tradeName", is(givenMembership.getPartner().getPerson().getTradeName()))
|
.body("partner.person.tradeName", is(givenMembership.getPartner().getPerson().getTradeName()))
|
||||||
.body("mainDebitor.debitorNumber", is(givenMembership.getMainDebitor().getDebitorNumber()))
|
.body("mainDebitor.debitorNumber", is(givenMembership.getMainDebitor().getDebitorNumber()))
|
||||||
// .body("mainDebitor.debitorNumber", is(givenMembership.getMainDebitor().getDebitorNumberSuffix()))
|
.body("mainDebitor.debitorNumberSuffix", is((int) givenMembership.getMainDebitor().getDebitorNumberSuffix()))
|
||||||
.body("memberNumber", is(givenMembership.getMemberNumber()))
|
.body("memberNumber", is(givenMembership.getMemberNumber()))
|
||||||
.body("validFrom", is("2022-11-01"))
|
.body("validFrom", is("2022-11-01"))
|
||||||
.body("validTo", is("2023-12-31"))
|
.body("validTo", is("2023-12-31"))
|
||||||
|
@ -150,8 +150,6 @@ class HsOfficeMembershipRepositoryIntegrationTest extends ContextBasedTest {
|
|||||||
// tenant
|
// tenant
|
||||||
"{ grant role membership#20002:First.tenant to role membership#20002:First.agent by system and assume }",
|
"{ grant role membership#20002:First.tenant to role membership#20002:First.agent by system and assume }",
|
||||||
"{ grant role partner#10001:First.guest to role membership#20002:First.tenant by system and assume }",
|
"{ grant role partner#10001:First.guest to role membership#20002:First.tenant by system and assume }",
|
||||||
// "{ grant role debitor#1100First.guest to role membership#20002:First.tenant by system and assume }",
|
|
||||||
// "{ grant role membership#20002:First.tenant to role debitor#1100First.agent by system and assume }",
|
|
||||||
"{ grant role debitor#1000111:First.guest to role membership#20002:First.tenant by system and assume }",
|
"{ grant role debitor#1000111:First.guest to role membership#20002:First.tenant by system and assume }",
|
||||||
"{ grant role membership#20002:First.tenant to role debitor#1000111:First.agent by system and assume }",
|
"{ grant role membership#20002:First.tenant to role debitor#1000111:First.agent by system and assume }",
|
||||||
|
|
||||||
@ -161,7 +159,6 @@ class HsOfficeMembershipRepositoryIntegrationTest extends ContextBasedTest {
|
|||||||
"{ grant perm view on membership#20002:First to role membership#20002:First.guest by system and assume }",
|
"{ grant perm view on membership#20002:First to role membership#20002:First.guest by system and assume }",
|
||||||
"{ grant role membership#20002:First.guest to role membership#20002:First.tenant by system and assume }",
|
"{ grant role membership#20002:First.guest to role membership#20002:First.tenant by system and assume }",
|
||||||
"{ grant role membership#20002:First.guest to role partner#10001:First.tenant by system and assume }",
|
"{ grant role membership#20002:First.guest to role partner#10001:First.tenant by system and assume }",
|
||||||
// "{ grant role membership#20002:First.guest to role debitor#1100First.tenant by system and assume }",
|
|
||||||
"{ grant role membership#20002:First.guest to role debitor#1000111:First.tenant by system and assume }",
|
"{ grant role membership#20002:First.guest to role debitor#1000111:First.tenant by system and assume }",
|
||||||
|
|
||||||
null));
|
null));
|
||||||
|
@ -459,19 +459,6 @@ public class ImportOfficeData extends ContextBasedTest {
|
|||||||
private void deleteFromRbacTables() {
|
private void deleteFromRbacTables() {
|
||||||
jpaAttempt.transacted(() -> {
|
jpaAttempt.transacted(() -> {
|
||||||
context(rbacSuperuser);
|
context(rbacSuperuser);
|
||||||
final var usersNotToDelete = em.createNativeQuery("select name from rbacuser where name like 'superuser-%'")
|
|
||||||
.getResultList();
|
|
||||||
final var usersToDelete = em.createNativeQuery("select name from rbacuser where name not like 'superuser-%'")
|
|
||||||
.getResultList();
|
|
||||||
System.getenv();
|
|
||||||
});
|
|
||||||
|
|
||||||
jpaAttempt.transacted(() -> {
|
|
||||||
context(rbacSuperuser);
|
|
||||||
// em.createNativeQuery("DELETE FROM rbacobject WHERE objecttable like 'hs_%'").executeUpdate();
|
|
||||||
// em.createNativeQuery("DELETE FROM rbacgrants WHERE true").executeUpdate();
|
|
||||||
// em.createNativeQuery("DELETE FROM rbacpermission WHERE true").executeUpdate();
|
|
||||||
// em.createNativeQuery("DELETE FROM rbacreference WHERE true").executeUpdate();
|
|
||||||
em.createNativeQuery("delete from rbacuser_rv where name not like 'superuser-%'").executeUpdate();
|
em.createNativeQuery("delete from rbacuser_rv where name not like 'superuser-%'").executeUpdate();
|
||||||
em.createNativeQuery("delete from tx_journal where true").executeUpdate();
|
em.createNativeQuery("delete from tx_journal where true").executeUpdate();
|
||||||
em.createNativeQuery("delete from tx_context where true").executeUpdate();
|
em.createNativeQuery("delete from tx_context where true").executeUpdate();
|
||||||
|
Loading…
Reference in New Issue
Block a user