fixed broken auth tests w/ burnettk
This commit is contained in:
parent
013a2cb34a
commit
2297477044
|
@ -65,9 +65,15 @@ class PermissionToAssign:
|
|||
target_uri: str
|
||||
|
||||
|
||||
# you can explicitly call out the CRUD actions you want to permit. These include: ["create", "read", "update", "delete"]
|
||||
# if you hate typing, you can instead specify "all". If you do this, you might think it would grant access to
|
||||
# ["create", "read", "update", "delete"] for everything. instead, we do this cute thing where we, as the API authors,
|
||||
# understand that not all verbs are relevant for all API paths. For example, you cannot create logs over the API at this juncture,
|
||||
# so for /logs, only "read" is relevant. When you ask for /logs, "all", we give you read.
|
||||
# the relevant permissions are the only API methods that are currently available for each path prefix.
|
||||
# if we add further API methods, we'll need to evaluate whether they should be added here.
|
||||
PATH_SEGMENTS_FOR_PERMISSION_ALL = [
|
||||
{"path": "/event-error-details", "relevant_permissions": ["read"]},
|
||||
{"path": "/logs", "relevant_permissions": ["read"]},
|
||||
{
|
||||
"path": "/process-instances",
|
||||
|
|
|
@ -66,6 +66,11 @@ class TestGetAllPermissions(BaseTest):
|
|||
"uri": "/process-data-file-download/hey:group:*",
|
||||
"permissions": ["read"],
|
||||
},
|
||||
{
|
||||
"group_identifier": "my_test_group",
|
||||
"uri": "/event-error-details/hey:group:*",
|
||||
"permissions": ["read"],
|
||||
},
|
||||
]
|
||||
|
||||
permissions = GetAllPermissions().run(script_attributes_context)
|
||||
|
|
|
@ -124,6 +124,7 @@ class TestAuthorizationService(BaseTest):
|
|||
"""Test_explode_permissions_all_on_process_group."""
|
||||
expected_permissions = sorted(
|
||||
[
|
||||
("/event-error-details/some-process-group:some-process-model:*", "read"),
|
||||
("/logs/some-process-group:some-process-model:*", "read"),
|
||||
("/process-data/some-process-group:some-process-model:*", "read"),
|
||||
(
|
||||
|
@ -173,6 +174,7 @@ class TestAuthorizationService(BaseTest):
|
|||
) -> None:
|
||||
"""Test_explode_permissions_start_on_process_group."""
|
||||
expected_permissions = [
|
||||
("/event-error-details/some-process-group:some-process-model:*", "read"),
|
||||
(
|
||||
"/logs/some-process-group:some-process-model:*",
|
||||
"read",
|
||||
|
@ -202,6 +204,7 @@ class TestAuthorizationService(BaseTest):
|
|||
"""Test_explode_permissions_all_on_process_model."""
|
||||
expected_permissions = sorted(
|
||||
[
|
||||
("/event-error-details/some-process-group:some-process-model/*", "read"),
|
||||
("/logs/some-process-group:some-process-model/*", "read"),
|
||||
(
|
||||
"/process-data-file-download/some-process-group:some-process-model/*",
|
||||
|
@ -247,6 +250,10 @@ class TestAuthorizationService(BaseTest):
|
|||
) -> None:
|
||||
"""Test_explode_permissions_start_on_process_model."""
|
||||
expected_permissions = [
|
||||
(
|
||||
"/event-error-details/some-process-group:some-process-model/*",
|
||||
"read",
|
||||
),
|
||||
(
|
||||
"/logs/some-process-group:some-process-model/*",
|
||||
"read",
|
||||
|
|
Loading…
Reference in New Issue