basis.defineContext(...)

This commit is contained in:
Michael Hoennig 2024-09-13 08:16:22 +02:00
parent 984cf0ef3b
commit c2e8be096c
43 changed files with 65 additions and 65 deletions

View File

@ -54,7 +54,7 @@ public class Context {
final String currentUser,
final String assumedRoles) {
final var query = em.createNativeQuery("""
call defineContext(
call basis.defineContext(
cast(:currentTask as varchar(127)),
cast(:currentRequest as text),
cast(:currentUser as varchar(63)),

View File

@ -67,7 +67,7 @@ public class InsertTriggerGenerator {
declare
row ${rawSuperTable};
begin
call defineContext('create INSERT INTO ${rawSubTable} permissions for pre-exising ${rawSuperTable} rows');
call basis.defineContext('create INSERT INTO ${rawSubTable} permissions for pre-exising ${rawSuperTable} rows');
FOR row IN SELECT * FROM ${rawSuperTable}
${whenCondition}

View File

@ -9,7 +9,7 @@
Callback which is called after the context has been (re-) defined.
This function will be overwritten by later changesets.
*/
create procedure contextDefined(
create procedure basis.contextDefined(
currentTask varchar(127),
currentRequest text,
currentUser varchar(63),
@ -22,7 +22,7 @@ end; $$;
/*
Defines the transaction context.
*/
create or replace procedure defineContext(
create or replace procedure basis.defineContext(
currentTask varchar(127),
currentRequest text = null,
currentUser varchar(63) = null,
@ -46,7 +46,7 @@ begin
assert length(assumedRoles) <= 1023, FORMAT('assumedRoles must not be longer than 1023 characters: "%s"', assumedRoles);
execute format('set local hsadminng.assumedRoles to %L', assumedRoles);
call contextDefined(currentTask, currentRequest, currentUser, assumedRoles);
call basis.contextDefined(currentTask, currentRequest, currentUser, assumedRoles);
end; $$;
--//
@ -72,7 +72,7 @@ begin
currentTask := null;
end;
if (currentTask is null or currentTask = '') then
raise exception '[401] currentTask must be defined, please call `defineContext(...)`';
raise exception '[401] currentTask must be defined, please call `basis.defineContext(...)`';
end if;
return currentTask;
end; $$;
@ -83,7 +83,7 @@ end; $$;
--changeset context-CURRENT-REQUEST:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
/*
Returns the current http request as set via `defineContext(...)`.
Returns the current http request as set via `basis.defineContext(...)`.
Raises exception if not set.
*/
create or replace function currentRequest()
@ -108,7 +108,7 @@ end; $$;
--changeset context-CURRENT-USER:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
/*
Returns the current user as defined by `defineContext(...)`.
Returns the current user as defined by `basis.defineContext(...)`.
*/
create or replace function currentUser()
returns varchar(63)

View File

@ -18,7 +18,7 @@ begin
select uuid from RbacUser where name = currentUser into currentUserUuid;
if currentUserUuid is null then
raise exception '[401] user % given in `defineContext(...)` does not exist', currentUser;
raise exception '[401] user % given in `basis.defineContext(...)` does not exist', currentUser;
end if;
return currentUserUuid;
end; $$;
@ -84,7 +84,7 @@ end; $$;
Callback which is called after the context has been (re-) defined.
This function will be overwritten by later changesets.
*/
create or replace procedure contextDefined(
create or replace procedure basis.contextDefined(
currentTask varchar(127),
currentRequest text,
currentUser varchar(63),
@ -114,7 +114,7 @@ end; $$;
--changeset rbac-context-CURRENT-USER-ID:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
/*
Returns the uuid of the current user as set via `defineContext(...)`.
Returns the uuid of the current user as set via `basis.defineContext(...)`.
*/
create or replace function currentUserUuid()
@ -136,7 +136,7 @@ begin
if (length(currentUserName) > 0) then
raise exception '[401] currentUserUuid cannot be determined, unknown user name "%"', currentUserName;
else
raise exception '[401] currentUserUuid cannot be determined, please call `defineContext(...)` first;"';
raise exception '[401] currentUserUuid cannot be determined, please call `basis.defineContext(...)` first;"';
end if;
end if;
return currentUserUuid::uuid;
@ -147,8 +147,8 @@ end; $$;
--changeset rbac-context-CURRENT-SUBJECT-UUIDS:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
/*
Returns the uuid of the current user as set via `defineContext(...)`,
or, if any, the uuids of all assumed roles as set via `defineContext(...)`
Returns the uuid of the current user as set via `basis.defineContext(...)`,
or, if any, the uuids of all assumed roles as set via `basis.defineContext(...)`
or empty array, if context is not defined.
*/
create or replace function currentSubjectsUuids()
@ -170,7 +170,7 @@ begin
if (length(currentUserName) > 0) then
raise exception '[401] currentSubjectsUuids (%) cannot be determined, unknown user name "%"', currentSubjectsUuids, currentUserName;
else
raise exception '[401] currentSubjectsUuids cannot be determined, please call `defineContext(...)` with a valid user;"';
raise exception '[401] currentSubjectsUuids cannot be determined, please call `basis.defineContext(...)` with a valid user;"';
end if;
end if;
return string_to_array(currentSubjectsUuids, ';');

View File

@ -94,7 +94,7 @@ $$;
A single row to be referenced as a global object.
*/
begin transaction;
call defineContext('initializing table "global"', null, null, null);
call basis.defineContext('initializing table "global"', null, null, null);
insert
into RbacObject (objecttable) values ('global');
insert
@ -118,7 +118,7 @@ select 'global', (select uuid from RbacObject where objectTable = 'global'), 'AD
$$;
begin transaction;
call defineContext('creating role:global#global:ADMIN', null, null, null);
call basis.defineContext('creating role:global#global:ADMIN', null, null, null);
select createRole(globalAdmin());
commit;
--//
@ -139,7 +139,7 @@ select 'global', (select uuid from RbacObject where objectTable = 'global'), 'GU
$$;
begin transaction;
call defineContext('creating role:global#global:guest', null, null, null);
call basis.defineContext('creating role:global#global:guest', null, null, null);
select createRole(globalGuest());
commit;
--//
@ -155,7 +155,7 @@ do language plpgsql $$
declare
admins uuid ;
begin
call defineContext('creating fake test-realm admin users', null, null, null);
call basis.defineContext('creating fake test-realm admin users', null, null, null);
admins = findRoleId(globalAdmin());
call grantRoleToUserUnchecked(admins, admins, createRbacUser('superuser-alex@hostsharing.net'));
@ -179,13 +179,13 @@ do language plpgsql $$
declare
userName varchar;
begin
call defineContext('testing currentUserUuid', null, 'superuser-fran@hostsharing.net', null);
call basis.defineContext('testing currentUserUuid', null, 'superuser-fran@hostsharing.net', null);
select userName from RbacUser where uuid = currentUserUuid() into userName;
if userName <> 'superuser-fran@hostsharing.net' then
raise exception 'setting or fetching initial currentUser failed, got: %', userName;
end if;
call defineContext('testing currentUserUuid', null, 'superuser-alex@hostsharing.net', null);
call basis.defineContext('testing currentUserUuid', null, 'superuser-alex@hostsharing.net', null);
select userName from RbacUser where uuid = currentUserUuid() into userName;
if userName = 'superuser-alex@hostsharing.net' then
raise exception 'currentUser should not change in one transaction, but did change, got: %', userName;

View File

@ -89,7 +89,7 @@ do language plpgsql $$
declare
row global;
begin
call defineContext('create INSERT INTO test_customer permissions for pre-exising global rows');
call basis.defineContext('create INSERT INTO test_customer permissions for pre-exising global rows');
FOR row IN SELECT * FROM global
-- unconditional for all rows in that table

View File

@ -72,7 +72,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating RBAC test customer', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating RBAC test customer', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createTestCustomerTestData(99901, 'xxx');
call createTestCustomerTestData(99902, 'yyy');

View File

@ -154,7 +154,7 @@ do language plpgsql $$
declare
row test_customer;
begin
call defineContext('create INSERT INTO test_package permissions for pre-exising test_customer rows');
call basis.defineContext('create INSERT INTO test_package permissions for pre-exising test_customer rows');
FOR row IN SELECT * FROM test_customer
-- unconditional for all rows in that table

View File

@ -22,7 +22,7 @@ begin
pacName = cust.prefix || to_char(t, 'fm00');
custAdminUser = 'customer-admin@' || cust.prefix || '.example.com';
custAdminRole = 'test_customer#' || cust.prefix || ':ADMIN';
call defineContext('creating RBAC test package', null, 'superuser-fran@hostsharing.net', custAdminRole);
call basis.defineContext('creating RBAC test package', null, 'superuser-fran@hostsharing.net', custAdminRole);
insert
into test_package (customerUuid, name, description)

View File

@ -153,7 +153,7 @@ do language plpgsql $$
declare
row test_package;
begin
call defineContext('create INSERT INTO test_domain permissions for pre-exising test_package rows');
call basis.defineContext('create INSERT INTO test_domain permissions for pre-exising test_package rows');
FOR row IN SELECT * FROM test_package
-- unconditional for all rows in that table

View File

@ -21,7 +21,7 @@ begin
for t in 0..(domainCount-1)
loop
pacAdmin = 'pac-admin-' || pac.name || '@' || pac.custPrefix || '.example.com';
call defineContext('creating RBAC test domain', null, pacAdmin, null);
call basis.defineContext('creating RBAC test domain', null, pacAdmin, null);
insert
into test_domain (name, packageUuid)

View File

@ -40,7 +40,7 @@ ALTER TABLE hs_office_contact_legacy_id
--changeset hs-office-contact-MIGRATION-insert:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
CALL defineContext('schema-migration');
CALL basis.defineContext('schema-migration');
INSERT INTO hs_office_contact_legacy_id(uuid, contact_id)
SELECT uuid, nextVal('hs_office_contact_legacy_id_seq') FROM hs_office_contact;
--/

View File

@ -15,9 +15,9 @@ declare
emailAddr varchar;
begin
emailAddr = 'contact-admin@' || cleanIdentifier(contCaption) || '.example.com';
call defineContext('creating contact test-data');
call basis.defineContext('creating contact test-data');
perform createRbacUser(emailAddr);
call defineContext('creating contact test-data', null, emailAddr);
call basis.defineContext('creating contact test-data', null, emailAddr);
postalAddr := E'Vorname Nachname\nStraße Hnr\nPLZ Stadt';

View File

@ -21,9 +21,9 @@ declare
begin
fullName := concat_ws(', ', newTradeName, newFamilyName, newGivenName);
emailAddr = 'person-' || left(cleanIdentifier(fullName), 32) || '@example.com';
call defineContext('creating person test-data');
call basis.defineContext('creating person test-data');
perform createRbacUser(emailAddr);
call defineContext('creating person test-data', null, emailAddr);
call basis.defineContext('creating person test-data', null, emailAddr);
raise notice 'creating test person: % by %', fullName, emailAddr;
insert

View File

@ -163,7 +163,7 @@ do language plpgsql $$
declare
row hs_office_person;
begin
call defineContext('create INSERT INTO hs_office_relation permissions for pre-exising hs_office_person rows');
call basis.defineContext('create INSERT INTO hs_office_relation permissions for pre-exising hs_office_person rows');
FOR row IN SELECT * FROM hs_office_person
-- unconditional for all rows in that table

View File

@ -85,7 +85,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating relation test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating relation test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsOfficeRelationTestData('First GmbH', 'PARTNER', 'Hostsharing eG', 'first contact');
call createHsOfficeRelationTestData('Firby', 'REPRESENTATIVE', 'First GmbH', 'first contact');

View File

@ -166,7 +166,7 @@ do language plpgsql $$
declare
row global;
begin
call defineContext('create INSERT INTO hs_office_partner permissions for pre-exising global rows');
call basis.defineContext('create INSERT INTO hs_office_partner permissions for pre-exising global rows');
FOR row IN SELECT * FROM global
-- unconditional for all rows in that table

View File

@ -70,7 +70,7 @@ do language plpgsql $$
declare
row global;
begin
call defineContext('create INSERT INTO hs_office_partner_details permissions for pre-exising global rows');
call basis.defineContext('create INSERT INTO hs_office_partner_details permissions for pre-exising global rows');
FOR row IN SELECT * FROM global
-- unconditional for all rows in that table

View File

@ -39,7 +39,7 @@ ALTER TABLE hs_office_partner_legacy_id
--changeset hs-office-partner-MIGRATION-insert:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
CALL defineContext('schema-migration');
CALL basis.defineContext('schema-migration');
INSERT INTO hs_office_partner_legacy_id(uuid, bp_id)
SELECT uuid, nextVal('hs_office_partner_legacy_id_seq') FROM hs_office_partner;
--/

View File

@ -71,7 +71,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating partner test-data ', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating partner test-data ', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsOfficePartnerTestData('Hostsharing eG', 10001, 'First GmbH', 'first contact');
call createHsOfficePartnerTestData('Hostsharing eG', 10002, 'Second e.K.', 'second contact');

View File

@ -15,7 +15,7 @@ declare
begin
emailAddr = 'bankaccount-admin@' || cleanIdentifier(givenHolder) || '.example.com';
perform createRbacUser(emailAddr);
call defineContext('creating bankaccount test-data', null, emailAddr);
call basis.defineContext('creating bankaccount test-data', null, emailAddr);
raise notice 'creating test bankaccount: %', givenHolder;
insert
@ -31,7 +31,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating bankaccount test-data');
call basis.defineContext('creating bankaccount test-data');
-- IBANs+BICs taken from https://ibanvalidieren.de/beispiele.html
call createHsOfficeBankAccountTestData('First GmbH', 'DE02120300000000202051', 'BYLADEM1001');

View File

@ -139,7 +139,7 @@ do language plpgsql $$
declare
row global;
begin
call defineContext('create INSERT INTO hs_office_debitor permissions for pre-exising global rows');
call basis.defineContext('create INSERT INTO hs_office_debitor permissions for pre-exising global rows');
FOR row IN SELECT * FROM global
-- unconditional for all rows in that table

View File

@ -50,7 +50,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating debitor test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating debitor test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsOfficeDebitorTestData(11, 'First GmbH', 'first contact', 'fir');
call createHsOfficeDebitorTestData(12, 'Second e.K.', 'second contact', 'sec');

View File

@ -114,7 +114,7 @@ do language plpgsql $$
declare
row hs_office_relation;
begin
call defineContext('create INSERT INTO hs_office_sepamandate permissions for pre-exising hs_office_relation rows');
call basis.defineContext('create INSERT INTO hs_office_sepamandate permissions for pre-exising hs_office_relation rows');
FOR row IN SELECT * FROM hs_office_relation
WHERE type = 'DEBITOR'

View File

@ -41,7 +41,7 @@ ALTER TABLE hs_office_sepamandate_legacy_id
--changeset hs-office-sepamandate-MIGRATION-insert:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
CALL defineContext('schema-migration');
CALL basis.defineContext('schema-migration');
INSERT INTO hs_office_sepamandate_legacy_id(uuid, sepa_mandate_id)
SELECT uuid, nextVal('hs_office_sepamandate_legacy_id_seq') FROM hs_office_sepamandate;
--/

View File

@ -43,7 +43,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating SEPA-mandate test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating SEPA-mandate test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsOfficeSepaMandateTestData(10001, '11', 'DE02120300000000202051', 'ref-10001-11');
call createHsOfficeSepaMandateTestData(10002, '12', 'DE02100500000054540402', 'ref-10002-12');

View File

@ -101,7 +101,7 @@ do language plpgsql $$
declare
row global;
begin
call defineContext('create INSERT INTO hs_office_membership permissions for pre-exising global rows');
call basis.defineContext('create INSERT INTO hs_office_membership permissions for pre-exising global rows');
FOR row IN SELECT * FROM global
-- unconditional for all rows in that table

View File

@ -33,7 +33,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating Membership test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating Membership test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsOfficeMembershipTestData(10001, '01');
call createHsOfficeMembershipTestData(10002, '02');

View File

@ -77,7 +77,7 @@ do language plpgsql $$
declare
row hs_office_membership;
begin
call defineContext('create INSERT INTO hs_office_coopsharestransaction permissions for pre-exising hs_office_membership rows');
call basis.defineContext('create INSERT INTO hs_office_coopsharestransaction permissions for pre-exising hs_office_membership rows');
FOR row IN SELECT * FROM hs_office_membership
-- unconditional for all rows in that table

View File

@ -40,7 +40,7 @@ ALTER TABLE hs_office_coopsharestransaction_legacy_id
--changeset hs-office-coopshares-MIGRATION-insert:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
CALL defineContext('schema-migration');
CALL basis.defineContext('schema-migration');
INSERT INTO hs_office_coopsharestransaction_legacy_id(uuid, member_share_id)
SELECT uuid, nextVal('hs_office_coopsharestransaction_legacy_id_seq') FROM hs_office_coopsharestransaction;
--/

View File

@ -43,7 +43,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating coopSharesTransaction test-data');
call basis.defineContext('creating coopSharesTransaction test-data');
SET CONSTRAINTS ALL DEFERRED;
call createHsOfficeCoopSharesTransactionTestData(10001, '01');

View File

@ -77,7 +77,7 @@ do language plpgsql $$
declare
row hs_office_membership;
begin
call defineContext('create INSERT INTO hs_office_coopassetstransaction permissions for pre-exising hs_office_membership rows');
call basis.defineContext('create INSERT INTO hs_office_coopassetstransaction permissions for pre-exising hs_office_membership rows');
FOR row IN SELECT * FROM hs_office_membership
-- unconditional for all rows in that table

View File

@ -40,7 +40,7 @@ ALTER TABLE hs_office_coopassetstransaction_legacy_id
--changeset hs-office-coopassets-MIGRATION-insert:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
CALL defineContext('schema-migration');
CALL basis.defineContext('schema-migration');
INSERT INTO hs_office_coopassetstransaction_legacy_id(uuid, member_asset_id)
SELECT uuid, nextVal('hs_office_coopassetstransaction_legacy_id_seq') FROM hs_office_coopassetstransaction;
--/

View File

@ -43,7 +43,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating coopAssetsTransaction test-data');
call basis.defineContext('creating coopAssetsTransaction test-data');
SET CONSTRAINTS ALL DEFERRED;
call createHsOfficeCoopAssetsTransactionTestData(10001, '01');

View File

@ -108,7 +108,7 @@ do language plpgsql $$
declare
row hs_office_relation;
begin
call defineContext('create INSERT INTO hs_booking_project permissions for pre-exising hs_office_relation rows');
call basis.defineContext('create INSERT INTO hs_booking_project permissions for pre-exising hs_office_relation rows');
FOR row IN SELECT * FROM hs_office_relation
WHERE type = 'DEBITOR'

View File

@ -39,7 +39,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating booking-project test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating booking-project test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsBookingProjectTransactionTestData(10001, '11');
call createHsBookingProjectTransactionTestData(10002, '12');

View File

@ -107,7 +107,7 @@ do language plpgsql $$
declare
row global;
begin
call defineContext('create INSERT INTO hs_booking_item permissions for pre-exising global rows');
call basis.defineContext('create INSERT INTO hs_booking_item permissions for pre-exising global rows');
FOR row IN SELECT * FROM global
-- unconditional for all rows in that table
@ -150,7 +150,7 @@ do language plpgsql $$
declare
row hs_booking_project;
begin
call defineContext('create INSERT INTO hs_booking_item permissions for pre-exising hs_booking_project rows');
call basis.defineContext('create INSERT INTO hs_booking_item permissions for pre-exising hs_booking_project rows');
FOR row IN SELECT * FROM hs_booking_project
-- unconditional for all rows in that table

View File

@ -47,7 +47,7 @@ do language plpgsql $$
declare
currentTask text;
begin
call defineContext('creating booking-item test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating booking-item test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsBookingItemTransactionTestData(10001, '11');
call createHsBookingItemTransactionTestData(10002, '12');

View File

@ -107,7 +107,7 @@ do language plpgsql $$
declare
row global;
begin
call defineContext('create INSERT INTO hs_booking_item permissions for pre-exising global rows');
call basis.defineContext('create INSERT INTO hs_booking_item permissions for pre-exising global rows');
FOR row IN SELECT * FROM global
-- unconditional for all rows in that table
@ -150,7 +150,7 @@ do language plpgsql $$
declare
row hs_booking_project;
begin
call defineContext('create INSERT INTO hs_booking_item permissions for pre-exising hs_booking_project rows');
call basis.defineContext('create INSERT INTO hs_booking_item permissions for pre-exising hs_booking_project rows');
FOR row IN SELECT * FROM hs_booking_project
-- unconditional for all rows in that table

View File

@ -30,7 +30,7 @@ declare
pgSqlInstanceUuid uuid;
PgSqlUserUuid uuid;
begin
call defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
select project.* into relatedProject
from hs_booking_project project
@ -110,7 +110,7 @@ end; $$;
do language plpgsql $$
begin
call defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call basis.defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'global#global:ADMIN');
call createHsHostingAssetTestData('D-1000111 default project');
call createHsHostingAssetTestData('D-1000212 default project');

View File

@ -81,7 +81,7 @@ class ContextIntegrationTests {
// then
result.assertExceptionWithRootCauseMessage(
jakarta.persistence.PersistenceException.class,
"[401] user unknown@example.org given in `defineContext(...)` does not exist");
"[401] user unknown@example.org given in `basis.defineContext(...)` does not exist");
}
@Test

View File

@ -28,7 +28,7 @@ import static org.mockito.Mockito.verify;
class ContextUnitTest {
private static final String DEFINE_CONTEXT_QUERY_STRING = """
call defineContext(
call basis.defineContext(
cast(:currentTask as varchar(127)),
cast(:currentRequest as text),
cast(:currentUser as varchar(63)),

View File

@ -146,7 +146,7 @@ class RbacRoleRepositoryIntegrationTest {
result.assertExceptionWithRootCauseMessage(
JpaSystemException.class,
"[401] currentSubjectsUuids cannot be determined, please call `defineContext(...)` with a valid user");
"[401] currentSubjectsUuids cannot be determined, please call `basis.defineContext(...)` with a valid user");
}
}