UN-2651 [FIX] Show execution logs to group and org-shared users - #2234
UN-2651 [FIX] Show execution logs to group and org-shared users#2234kirtimanmishrazipstack wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The executions list resolved visibility through direct memberships only, so a deployment reached via a group share or shared_to_org opened fine while its Logs page came back empty. Defer to each resource's own for_user, which spans every sharing path the resource list itself honours (owner, co-owner, direct share, group share, shared_to_org). The per-execution logs and export endpoints had the mirrored problem: no scoping at all. IsOwner sat in permission_classes but implements only has_object_permission, which DRF never invokes on list/export, so any org member holding an execution id could read and CSV-export its logs. Gate the queryset on the executions the caller can see instead, and deny a missing execution the same way as an inaccessible one so the response does not confirm which ids exist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
f680ac4 to
5faa618
Compare
|



What
Why
How
for_user, which covers owner, co-owner, direct share, group share andshared_to_org./executions/<id>/logs/and/logs/export/gate on the executions the caller can see; an unknown id is denied the same way as an inaccessible one, so responses do not reveal which ids exist.IsOwnerfrom the log viewset — it implements onlyhas_object_permission, which DRF never calls on list/export.Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
Dependencies Versions
Notes on Testing
backend/workflow_manager/execution/tests/test_shared_execution_access.py— 5 tests covering group share, org-wide share, unshared, and both log-access paths. 3 fail onmain, all 5 pass on this branch.Screenshots
Checklist
I have read and understood the Contribution Guidelines.