Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@
"type": "userGroup"
},
"name": "SELF_CREATE_TOKEN"
},
{
"assignee": {
"id": "adminGroup",
"type": "userGroup"
},
"name": "BASE_UI_ACCESS"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interactions:
permissions:
- MANAGE
- SELF_CREATE_TOKEN
- BASE_UI_ACCESS
headers:
Accept-Encoding:
- br, gzip, deflate
Expand Down Expand Up @@ -67,7 +68,7 @@ interactions:
Cache-Control:
- no-cache, no-store, max-age=0, must-revalidate
Content-Length:
- '148'
- '223'
Content-Type:
- application/json
DATE: *id001
Expand Down Expand Up @@ -96,6 +97,10 @@ interactions:
id: adminGroup
type: userGroup
name: SELF_CREATE_TOKEN
- assignee:
id: adminGroup
type: userGroup
name: BASE_UI_ACCESS
- request:
method: PUT
uri: http://localhost:3000/api/v1/layout/organization/permissions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ interactions:
id: adminGroup
type: userGroup
name: SELF_CREATE_TOKEN
- assignee:
id: adminGroup
type: userGroup
name: BASE_UI_ACCESS
headers:
Accept-Encoding:
- br, gzip, deflate
Expand Down Expand Up @@ -69,7 +73,7 @@ interactions:
Cache-Control:
- no-cache, no-store, max-age=0, must-revalidate
Content-Length:
- '148'
- '223'
Content-Type:
- application/json
DATE: *id001
Expand Down Expand Up @@ -98,6 +102,10 @@ interactions:
id: adminGroup
type: userGroup
name: SELF_CREATE_TOKEN
- assignee:
id: adminGroup
type: userGroup
name: BASE_UI_ACCESS
- request:
method: PUT
uri: http://localhost:3000/api/v1/layout/organization/permissions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,12 @@ def test_put_and_get_declarative_organization_permissions(test_config, snapshot_
sdk.catalog_permission.put_declarative_organization_permissions(declarative_organization_permissions)

catalog_declarative_permissions_after_put = sdk.catalog_permission.get_declarative_organization_permissions()
assert len(catalog_declarative_permissions_after_put) == 2
assert len(catalog_declarative_permissions_after_put) == 3
_assert_organization_permissions_id(catalog_declarative_permissions_after_put)
assert set(org_permission.name for org_permission in catalog_declarative_permissions_after_put) == {
"MANAGE",
"SELF_CREATE_TOKEN",
"BASE_UI_ACCESS",
}
finally:
safe_delete(_default_organization_permissions, sdk)
Expand All @@ -231,16 +232,17 @@ def test_manage_organization_permissions(test_config, snapshot_org_permissions):
[
CatalogOrganizationPermissionAssignment(
assignee_identifier=CatalogAssigneeIdentifier(id="adminGroup", type="userGroup"),
permissions=["MANAGE", "SELF_CREATE_TOKEN"],
permissions=["MANAGE", "SELF_CREATE_TOKEN", "BASE_UI_ACCESS"],
)
],
)

catalog_declarative_permissions_initial = sdk.catalog_permission.get_declarative_organization_permissions()
assert len(catalog_declarative_permissions_initial) == 2
assert len(catalog_declarative_permissions_initial) == 3
assert set(org_permission.name for org_permission in catalog_declarative_permissions_initial) == {
"MANAGE",
"SELF_CREATE_TOKEN",
"BASE_UI_ACCESS",
}
finally:
safe_delete(_default_organization_permissions, sdk)
Expand Down
Loading