Compare commits

..

No commits in common. "eb1bd12e7c30ca01f31db54d1d10253dd04d1c4b" and "f9f5c2111fc44dec01f55792f62691ed8896c1c3" have entirely different histories.

8 changed files with 6 additions and 9 deletions

View File

@ -28,7 +28,7 @@ commit;
set hsadminng.tx_history_txid to ''; set hsadminng.tx_history_txid to '';
set hsadminng.tx_history_timestamp to '2024-08-29 12:42'; set hsadminng.tx_history_timestamp to '2024-08-29 12:42';
-- all versions -- all versions
select base.tx_history_txid(), txc.txtimestamp, txc.currentSubject, txc.currentTask, haex.* select tx_history_txid(), txc.txtimestamp, txc.currentSubject, txc.currentTask, haex.*
from hs_hosting_asset_ex haex from hs_hosting_asset_ex haex
join base.tx_context txc on haex.txid=txc.txid join base.tx_context txc on haex.txid=txc.txid
where haex.identifier = 'test@thi.example.org'; where haex.identifier = 'test@thi.example.org';

View File

@ -33,7 +33,7 @@ $$
userId uuid; userId uuid;
result bool; result bool;
BEGIN BEGIN
userId = rbac.findRbacSubject('superuser-alex@hostsharing.net'); userId = findRbacSubject('superuser-alex@hostsharing.net');
result = (SELECT * FROM rbac.isPermissionGrantedToSubject(rbac.findPermissionId('package', 94928, 'add-package'), userId)); result = (SELECT * FROM rbac.isPermissionGrantedToSubject(rbac.findPermissionId('package', 94928, 'add-package'), userId));
IF (result) THEN IF (result) THEN
RAISE EXCEPTION 'expected permission NOT to be granted, but it is'; RAISE EXCEPTION 'expected permission NOT to be granted, but it is';

View File

@ -4,5 +4,5 @@
-- ============================================================================ -- ============================================================================
--changeset base-SCHEMA:1 endDelimiter:--// --changeset base-SCHEMA:1 endDelimiter:--//
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
CREATE SCHEMA base; CREATE SCHEMA IF NOT EXISTS base;
--// --//

View File

@ -127,7 +127,6 @@ begin
end; $$; end; $$;
--// --//
-- ============================================================================ -- ============================================================================
--changeset context-base.ASSUMED-ROLES:1 endDelimiter:--// --changeset context-base.ASSUMED-ROLES:1 endDelimiter:--//
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------

View File

@ -4,5 +4,5 @@
-- ============================================================================ -- ============================================================================
--changeset rbac-SCHEMA:1 endDelimiter:--// --changeset rbac-SCHEMA:1 endDelimiter:--//
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
CREATE SCHEMA rbac; CREATE SCHEMA IF NOT EXISTS rbac;
--// --//

View File

@ -168,7 +168,7 @@ $$;
-- ============================================================================ -- ============================================================================
--changeset rbac-global-TEST:1 context:dev,tc endDelimiter:--// --changeset rbac-global-TEST:1 context:dev,tc runAlways:true endDelimiter:--//
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
/* /*

View File

@ -4,5 +4,5 @@
-- ============================================================================ -- ============================================================================
--changeset test-SCHEMA:1 endDelimiter:--// --changeset test-SCHEMA:1 endDelimiter:--//
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
CREATE SCHEMA test; CREATE SCHEMA IF NOT EXISTS test;
--// --//

View File

@ -6,13 +6,11 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInfo; import org.junit.jupiter.api.TestInfo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.test.annotation.DirtiesContext;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext; import jakarta.persistence.PersistenceContext;
import java.sql.Timestamp; import java.sql.Timestamp;
@DirtiesContext
@Import(RbacGrantsDiagramService.class) @Import(RbacGrantsDiagramService.class)
public abstract class ContextBasedTest { public abstract class ContextBasedTest {