Save 1C access profile drafts
This commit is contained in:
@@ -1558,6 +1558,22 @@ def test_import_supports_structure_only_indexing(tmp_path: Path):
|
||||
assert "Роль.Менеджер" in preview_payload["proposed_profile"]["roles"]
|
||||
assert preview_payload["missing_objects"] == []
|
||||
|
||||
apply_profile = client.post(
|
||||
f"/projects/{project_id}/access/profiles",
|
||||
json={
|
||||
"name": "НовыйПрофильHTTP",
|
||||
"target_objects": ["HTTPСервис.ПубличныйAPI"],
|
||||
"permissions": ["read"],
|
||||
"author": "dev.ivan",
|
||||
},
|
||||
)
|
||||
assert apply_profile.status_code == 200
|
||||
assert apply_profile.json()["profile"]["attributes"]["status"] == "workspace_draft"
|
||||
|
||||
updated_access = client.get(f"/projects/{project_id}/access")
|
||||
assert updated_access.status_code == 200
|
||||
assert any(item["name"] == "НовыйПрофильHTTP" for item in updated_access.json()["profiles"])
|
||||
|
||||
tree = client.get(f"/projects/{project_id}/metadata/tree")
|
||||
assert tree.status_code == 200
|
||||
root = tree.json()["root"]
|
||||
|
||||
Reference in New Issue
Block a user