Skip to content

fix(access-control): let admins manage ownerless #608

Closed

Description

@uniqueg

Problem

FOCA's role controllers return 404 for resources that have no roles yet, even for admins. Resources stored before an app adopted ownership therefore can't be given an owner through the API, which is what trs-filer's migration needs (trs-filer #86).

Proposal

If the resource exists and the caller is an admin, listing and granting roles work, so an admin can assign the first owner. Others keep getting 404. The controllers need a way to know that the resource exists; reuse what the ownership helpers already take from the app, if possible.

Acceptance criteria

  • Tests: admin lists and grants on an ownerless resource; non-admin gets 404; missing resource gets 404; existing behaviour unchanged for resources with roles; 100% coverage.
  • Docs: access-control page, section on adopting ownership in an existing app.

Activity

  1. added this to the v0.21.0 milestone on Nov 3, 2026
  2. added
    priority: high
    status: triage
    type: bug
    workload: hours
    status: in progress
    and removed
    status: triage
    on Nov 3, 2026
  3. removed
    status: in progress
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: bugworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions