WIP
This commit is contained in:
parent
0a9fd9f83b
commit
18ce4fd8e9
@ -609,6 +609,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
|
||||||
|
create or replace procedure grantPermissionToRole(roleDesc RbacRoleDescriptor, permissionUuid uuid)
|
||||||
|
language plpgsql as $$
|
||||||
|
begin
|
||||||
|
call grantPermissionToRole(findRoleId(roleDesc), permissionUuid);
|
||||||
|
end;
|
||||||
|
$$;
|
||||||
|
|
||||||
-- TODO: deprecated, remove and use grantPermissionToRole(...)
|
-- TODO: deprecated, remove and use grantPermissionToRole(...)
|
||||||
create or replace procedure grantPermissionsToRole(roleUuid uuid, permissionIds uuid[])
|
create or replace procedure grantPermissionsToRole(roleUuid uuid, permissionIds uuid[])
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
|
@ -29,9 +29,9 @@ class TestCustomerEntityTest {
|
|||||||
subgraph customer:permissions[ ]
|
subgraph customer:permissions[ ]
|
||||||
style customer:permissions fill:#dd4901,stroke:white
|
style customer:permissions fill:#dd4901,stroke:white
|
||||||
|
|
||||||
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}}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -44,9 +44,9 @@ class TestCustomerEntityTest {
|
|||||||
role:customer:admin ==> role:customer:tenant
|
role:customer:admin ==> role:customer:tenant
|
||||||
|
|
||||||
%% granting permissions to roles
|
%% granting permissions to roles
|
||||||
role:customer:owner ==> perm:customer:delete
|
role:customer:owner ==> perm:customer:DELETE
|
||||||
role:customer:admin ==> perm:customer:add-package
|
role:customer:admin ==> perm:customer:UPDATE
|
||||||
role:customer:tenant ==> perm:customer:select
|
role:customer:tenant ==> perm:customer:SELECT
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,6 @@ class TestCustomerRepositoryIntegrationTest extends ContextBasedTest {
|
|||||||
final var count = testCustomerRepository.count();
|
final var count = testCustomerRepository.count();
|
||||||
|
|
||||||
// when
|
// when
|
||||||
|
|
||||||
final var result = attempt(em, () -> {
|
final var result = attempt(em, () -> {
|
||||||
final var newCustomer = new TestCustomerEntity(
|
final var newCustomer = new TestCustomerEntity(
|
||||||
UUID.randomUUID(), "www", 90001, "customer-admin@www.example.com");
|
UUID.randomUUID(), "www", 90001, "customer-admin@www.example.com");
|
||||||
|
@ -29,10 +29,10 @@ class TestPackageEntityTest {
|
|||||||
subgraph package:permissions[ ]
|
subgraph package:permissions[ ]
|
||||||
style package:permissions fill:#dd4901,stroke:white
|
style package:permissions fill:#dd4901,stroke:white
|
||||||
|
|
||||||
perm:package:insert{{package:insert}}
|
perm:package:INSERT{{package:INSERT}}
|
||||||
perm:package:delete{{package:delete}}
|
perm:package:DELETE{{package:DELETE}}
|
||||||
perm:package:update{{package:update}}
|
perm:package:UPDATE{{package:UPDATE}}
|
||||||
perm:package:select{{package:select}}
|
perm:package:SELECT{{package:SELECT}}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -62,10 +62,10 @@ class TestPackageEntityTest {
|
|||||||
role:package:tenant ==> role:customer:tenant
|
role:package:tenant ==> role:customer:tenant
|
||||||
|
|
||||||
%% granting permissions to roles
|
%% granting permissions to roles
|
||||||
role:customer:admin ==> perm:package:insert
|
role:customer:admin ==> perm:package:INSERT
|
||||||
role:package:owner ==> perm:package:delete
|
role:package:owner ==> perm:package:DELETE
|
||||||
role:package:owner ==> perm:package:update
|
role:package:owner ==> perm:package:UPDATE
|
||||||
role:package:tenant ==> perm:package:select
|
role:package:tenant ==> perm:package:SELECT
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user