fix TestCustomer tests + remove hack in currentSubjects()
This commit is contained in:
parent
2c552ff90a
commit
6b8d677670
@ -224,7 +224,6 @@ create or replace function currentSubjects()
|
|||||||
declare
|
declare
|
||||||
assumedRoles varchar(63)[];
|
assumedRoles varchar(63)[];
|
||||||
begin
|
begin
|
||||||
return assumedRoles();
|
|
||||||
assumedRoles := assumedRoles();
|
assumedRoles := assumedRoles();
|
||||||
if array_length(assumedRoles, 1) > 0 then
|
if array_length(assumedRoles, 1) > 0 then
|
||||||
return assumedRoles();
|
return assumedRoles();
|
||||||
|
@ -204,7 +204,7 @@ class TestCustomerControllerAcceptanceTest {
|
|||||||
.statusCode(403)
|
.statusCode(403)
|
||||||
.contentType(ContentType.JSON)
|
.contentType(ContentType.JSON)
|
||||||
.statusCode(403)
|
.statusCode(403)
|
||||||
.body("message", containsString("insert into test_customer not allowed for current subjects {customer-admin@yyy.example.com}"));
|
.body("message", containsString("ERROR: [403] insert into test_customer not allowed for current subjects {customer-admin@yyy.example.com}"));
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
// finally, the new customer was not created
|
// finally, the new customer was not created
|
||||||
|
@ -29,6 +29,7 @@ class TestCustomerEntityUnitTest {
|
|||||||
subgraph customer:permissions[ ]
|
subgraph customer:permissions[ ]
|
||||||
style customer:permissions fill:#dd4901,stroke:white
|
style customer:permissions fill:#dd4901,stroke:white
|
||||||
|
|
||||||
|
perm:customer:INSERT{{customer:INSERT}}
|
||||||
perm:customer:DELETE{{customer:DELETE}}
|
perm:customer:DELETE{{customer:DELETE}}
|
||||||
perm:customer:UPDATE{{customer:UPDATE}}
|
perm:customer:UPDATE{{customer:UPDATE}}
|
||||||
perm:customer:SELECT{{customer:SELECT}}
|
perm:customer:SELECT{{customer:SELECT}}
|
||||||
@ -44,6 +45,7 @@ class TestCustomerEntityUnitTest {
|
|||||||
role:customer:admin ==> role:customer:tenant
|
role:customer:admin ==> role:customer:tenant
|
||||||
|
|
||||||
%% granting permissions to roles
|
%% granting permissions to roles
|
||||||
|
role:global:admin ==> perm:customer:INSERT
|
||||||
role:customer:owner ==> perm:customer:DELETE
|
role:customer:owner ==> perm:customer:DELETE
|
||||||
role:customer:admin ==> perm:customer:UPDATE
|
role:customer:admin ==> perm:customer:UPDATE
|
||||||
role:customer:tenant ==> perm:customer:SELECT
|
role:customer:tenant ==> perm:customer:SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user