Skip to content

judging/acl.ts declares none of its portal.judging.* features, though setup.ts grants four #185

Description

@pat-lewczuk

Noticed while adding portal.judging.results.export to src/modules/judging/acl.ts (review finding
F4 on PR #153).

The inconsistency

judging/acl.ts declares no portal.judging.* features. Four of them —
portal.judging.score, portal.judging.results.view, portal.judging.demos.view,
portal.judging.view_assigned — are granted in defaultCustomerRoleFeatures in
src/modules/judging/setup.ts and checked in route handlers and page.meta.ts files, but never
declared anywhere.

src/modules/bounties/acl.ts does declare its portal features, so the repo has both conventions.

Why it matters

Per AGENTS.md, a feature id is meant to be declared in the module's acl.ts and granted in
setup.ts. Undeclared-but-granted features still work — the grant is what the runtime checks — but:

  • They are invisible to anything that enumerates the feature catalogue (role editors, permission
    UIs, docs).
  • There is no single place to see what the module's portal permission surface is, which is how
    finding F4 happened: a feature whose name suggested "organisers and judges" was quietly granted to
    participant, and nothing made that contradiction visible.

Expected

Declare the four existing portal.judging.* features in judging/acl.ts alongside the newly added
portal.judging.results.export. Pure declaration — do not change any grant in setup.ts, since
the current grants are the live behaviour and changing them is a separate, reviewable decision.

This was deliberately left out of PR #153's remediation to keep that change scoped to the finding.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions