Skip to content

Indexer: open licences become required configuration, with one "is this licence open" function #95

Open

Description

@johnf

Parent

Spec: indexer redesign

What to build

A prefactor for Access control: the open-licence list becomes deployment configuration, and one function decides whether a licence is open.

  • OPEN_LICENSES is a required environment setting, a comma-separated list of licence ids. There's no default in code, and the app refuses to start without it rather than treating every licence as closed.
  • The four Creative Commons URLs in code today move to the example environment file and the deployment configuration.
  • One "is this licence open" function, in the access module, is used by today's indexer (for the stored accessControl label) and by the request-time licence check. Only that function reads the setting.
  • The access-control label type (Public / AuthorizationByApplication) lives beside it in the access module.

Acceptance criteria

  • Starting without OPEN_LICENSES fails with a configuration error naming it.
  • Nothing outside configuration and the access module refers to the open-licence list.
  • Indexing and the request-time check give the same answer for the same licence id, tested through each caller.
  • Example environment file, deployment configuration and README document the setting.
  • pnpm test and pnpm lint pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions