feat(server): add project RBAC and guarded workflows
This commit is contained in:
@@ -30,7 +30,7 @@ def test_agent_auth_context_returns_metadata_user_and_project_context():
|
||||
project_id=project_id,
|
||||
project_code="fengyang",
|
||||
user_id=user_id,
|
||||
project_role="editor",
|
||||
project_role="member",
|
||||
),
|
||||
current_user=SimpleNamespace(
|
||||
id=user_id,
|
||||
@@ -52,7 +52,21 @@ def test_agent_auth_context_returns_metadata_user_and_project_context():
|
||||
"is_superuser": False,
|
||||
"project_id": str(project_id),
|
||||
"network": "fengyang",
|
||||
"project_role": "editor",
|
||||
"project_role": "member",
|
||||
"permissions": [
|
||||
"burst.run",
|
||||
"burst.view",
|
||||
"optimization.run",
|
||||
"optimization.view",
|
||||
"risk.run",
|
||||
"risk.view",
|
||||
"scada.clean",
|
||||
"scada.view",
|
||||
"simulation.run",
|
||||
"simulation.view",
|
||||
"webgis.edit",
|
||||
"webgis.view",
|
||||
],
|
||||
"token_expires_at": "2026-06-11T13:10:00+00:00",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user