Skip to content

Apply consistent access checks across Studio endpoints #6398

Open
0 of 10 issues completed
Open

Description

@rtibbles

Overview

Several Studio endpoints don't apply the access checks the rest of the API follows. Some viewset actions query models directly instead of through the permission-scoped queryset. Some writable fields should come from the logged-in user. Some views accept requests they should refuse. Each sub-issue closes one gap so it matches the access pattern of its neighbouring endpoints.

Scope

Guidance

  • Target hotfixes.
  • Each access-check fix needs a regression test showing that a user without access gets the same response as for a nonexistent object. Each hardening fix needs a regression test for the request it now refuses.

Strategy

  • Viewset actions load objects through get_object() / get_edit_object(), or the model's filter_view_queryset / filter_edit_queryset, never Model.objects directly.
  • A field that identifies the requester is read-only in the serializer and set from request.user.

AI usage

I chose which audit findings belong here and set the access pattern. Claude Code found and reproduced each gap and drafted this issue.

Sub-issues

Sub-issues

0 of 10 Issues completed
Loading 10 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions