Item kinds (pdv_item_kind) are global today: every tenant offers every kind. With multi-tenancy (#3593589), an operator hosting several tenants wants a hybrid catalogue: generic kinds shared across all tenants, plus kinds that belong to a single tenant (for example, document types specific to one organization).

Design (decided with the maintainer: one optional tenant per kind):

  • add an optional single tenant scope to pdv_item_kind. Empty means shared, offered in every tenant, which is exactly today's behavior, so the change is backward compatible. A set value pins the kind to that one tenant.
  • resolution helper: kinds available in tenant T = shared kinds plus kinds scoped to T. The owner upload form, the consumer request and store flows, and the approve-request kind filter all read through it.
  • enforce on the write path: storing an item of kind K in tenant T requires K to be available in T, mirroring the loadItem and createGrant tenant gates.
  • kind admin form gets a tenant selector (empty means shared); the kind list shows each kind's scope.

Scoping is one tenant per kind for now; a kind needing a subset of several tenants can be a later extension.

Issue fork pdv-3593724

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 5e832897 on 1.x
    feat: #3593724 Hybrid item-kind catalogue: shared kinds plus optional...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.