You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(audit): a permissions replacement is audited with no targets — permissions_set details.targets is always null #3549
Replacing an agent's collaboration permissions writes a permissions_set audit row whose details.targets is always null. The row records that the set changed and for which agent, and drops which agents were granted.
Build + row
v1.0.0-rc2 (96f88f982), release-test row B10.
Steps
As an admin, PUT /api/agents/{name}/permissions with {"permitted_agents": ["<other-agent>"]}. Response: 200 {"status":"updated","permitted_count":1}.
Read the audit log and find the authorization / permissions_set row for {name}.
Expected
details.targets lists the agents in the new set (an empty list when the set was cleared).
Actual
details: {"targets": null} on every replacement, including the save made from the Permissions tab.
Where
src/backend/routers/agent_files.py::set_agent_permissions builds the audit details with body.get("permissions") or body.get("targets"). The request key the handler's own logic reads (services/agent_service/permissions.py::set_agent_permissions_logic) and the frontend sends is permitted_agents.
Acceptance criteria
The permissions_set audit row carries the list of target agents that was saved
A cleared set is recorded as an empty list, distinguishable from a missing value
A test asserts the audit details for a PUT with permitted_agents
Activity
fix(audit): record saved targets in permissions_set audit row (#4127)