mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-31 04:05:01 +00:00
fixed broken auth tests w/ burnettk
This commit is contained in:
parent
41fead68f2
commit
81e93d7079
@ -65,9 +65,15 @@ class PermissionToAssign:
|
|||||||
target_uri: str
|
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.
|
# 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.
|
# if we add further API methods, we'll need to evaluate whether they should be added here.
|
||||||
PATH_SEGMENTS_FOR_PERMISSION_ALL = [
|
PATH_SEGMENTS_FOR_PERMISSION_ALL = [
|
||||||
|
{"path": "/event-error-details", "relevant_permissions": ["read"]},
|
||||||
{"path": "/logs", "relevant_permissions": ["read"]},
|
{"path": "/logs", "relevant_permissions": ["read"]},
|
||||||
{
|
{
|
||||||
"path": "/process-instances",
|
"path": "/process-instances",
|
||||||
|
@ -66,6 +66,11 @@ class TestGetAllPermissions(BaseTest):
|
|||||||
"uri": "/process-data-file-download/hey:group:*",
|
"uri": "/process-data-file-download/hey:group:*",
|
||||||
"permissions": ["read"],
|
"permissions": ["read"],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"group_identifier": "my_test_group",
|
||||||
|
"uri": "/event-error-details/hey:group:*",
|
||||||
|
"permissions": ["read"],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
permissions = GetAllPermissions().run(script_attributes_context)
|
permissions = GetAllPermissions().run(script_attributes_context)
|
||||||
|
@ -124,6 +124,7 @@ class TestAuthorizationService(BaseTest):
|
|||||||
"""Test_explode_permissions_all_on_process_group."""
|
"""Test_explode_permissions_all_on_process_group."""
|
||||||
expected_permissions = sorted(
|
expected_permissions = sorted(
|
||||||
[
|
[
|
||||||
|
("/event-error-details/some-process-group:some-process-model:*", "read"),
|
||||||
("/logs/some-process-group:some-process-model:*", "read"),
|
("/logs/some-process-group:some-process-model:*", "read"),
|
||||||
("/process-data/some-process-group:some-process-model:*", "read"),
|
("/process-data/some-process-group:some-process-model:*", "read"),
|
||||||
(
|
(
|
||||||
@ -173,6 +174,7 @@ class TestAuthorizationService(BaseTest):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test_explode_permissions_start_on_process_group."""
|
"""Test_explode_permissions_start_on_process_group."""
|
||||||
expected_permissions = [
|
expected_permissions = [
|
||||||
|
("/event-error-details/some-process-group:some-process-model:*", "read"),
|
||||||
(
|
(
|
||||||
"/logs/some-process-group:some-process-model:*",
|
"/logs/some-process-group:some-process-model:*",
|
||||||
"read",
|
"read",
|
||||||
@ -202,6 +204,7 @@ class TestAuthorizationService(BaseTest):
|
|||||||
"""Test_explode_permissions_all_on_process_model."""
|
"""Test_explode_permissions_all_on_process_model."""
|
||||||
expected_permissions = sorted(
|
expected_permissions = sorted(
|
||||||
[
|
[
|
||||||
|
("/event-error-details/some-process-group:some-process-model/*", "read"),
|
||||||
("/logs/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/*",
|
"/process-data-file-download/some-process-group:some-process-model/*",
|
||||||
@ -247,6 +250,10 @@ class TestAuthorizationService(BaseTest):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test_explode_permissions_start_on_process_model."""
|
"""Test_explode_permissions_start_on_process_model."""
|
||||||
expected_permissions = [
|
expected_permissions = [
|
||||||
|
(
|
||||||
|
"/event-error-details/some-process-group:some-process-model/*",
|
||||||
|
"read",
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"/logs/some-process-group:some-process-model/*",
|
"/logs/some-process-group:some-process-model/*",
|
||||||
"read",
|
"read",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user