Plan publishing 1C access profiles
This commit is contained in:
@@ -2,6 +2,7 @@ from pathlib import Path
|
||||
import re
|
||||
import time
|
||||
from types import SimpleNamespace
|
||||
from urllib.parse import quote
|
||||
from uuid import uuid4
|
||||
import zipfile
|
||||
|
||||
@@ -1574,6 +1575,16 @@ def test_import_supports_structure_only_indexing(tmp_path: Path):
|
||||
assert updated_access.status_code == 200
|
||||
assert any(item["name"] == "НовыйПрофильHTTP" for item in updated_access.json()["profiles"])
|
||||
|
||||
publish_plan = client.get(
|
||||
f"/projects/{project_id}/access/profiles/{quote('НовыйПрофильHTTP')}/publish-plan"
|
||||
)
|
||||
assert publish_plan.status_code == 200
|
||||
plan_payload = publish_plan.json()
|
||||
assert plan_payload["ready_for_extension"] is True
|
||||
assert plan_payload["operations"][0]["action"] == "CREATE_ACCESS_PROFILE"
|
||||
assert any(item["action"] == "ADD_ROLE_TO_PROFILE" and item["role"] == "Роль.Менеджер" for item in plan_payload["operations"])
|
||||
assert plan_payload["extension_payload"]["operation"] == "access.profile.apply"
|
||||
|
||||
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