Save 1C access profile drafts
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-21 18:27:20 +03:00
parent feaf40c205
commit db5fdf0aa4
2 changed files with 96 additions and 0 deletions
+16
View File
@@ -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"]