Fix team member cannot edit agent (#14612)

### What problem does this PR solve?

Follow on PR: https://github.com/infiniflow/ragflow/pull/14602
to fix: team member cannot edit agent.
new behavior: beside delete, everything is allowed for team member.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Wang Qi
2026-05-07 15:09:13 +08:00
committed by GitHub
parent 1d114f034b
commit c50028b1f3
4 changed files with 46 additions and 46 deletions

View File

@@ -108,8 +108,8 @@ class TestAgentSessions:
update_url = f"{HOST_ADDRESS}/api/{VERSION}/agents/invalid-agent-id"
res = requests.put(update_url, auth=HttpApiAuth, json={"title": "updated", "dsl": MINIMAL_DSL}).json()
assert res["code"] == 103, res
assert "Only owner of canvas authorized" in res["message"], res
assert "Make sure you have permission to access the agent." in res["message"], res
res = delete_agent(HttpApiAuth, "invalid-agent-id")
assert res["code"] == 103, res
assert "Only owner of canvas authorized" in res["message"], res
assert "Only the owner of the agent is authorized for this operation." in res["message"], res