Add bundles to the consumer entity type

Created on 19 August 2025, 14 days ago

Problem/Motivation

The consumer entity type doesn't allow to organize consumers per types. In Drupal language, it doesn't allow entity bundles. But this can be helpful for projects or 3rd-party modules.

Use case

A 3rd-party module wants to allow users to apply to get a consumer. And after their request is approved, they are only able to update the secret. Ideally, there consumer types should be defined. A user would be able to apply only for a limited types of consumers (permission based). Each consumer type would include a preset of consumer configurations. When approved, it will just create a consumer with everything prefilled (from the type). Such a user will be able only to update the secret.

But now, the consumer entity type doesn't allow bundles, meaning that the 3rd-party should define its own objects to store the predefined types. While with consumer bundles, it would be more convenient to store them in the bundle's 3rd-party settings.

Proposed resolution

  • Add bundles to the consumer entity type.
  • New module installs will ship a default bundle
  • Add an update path that creates the default bundle and set it to all existing consumers.
  • Create routing and UI for bundle CRUD, same as for all entity types with bundles.

Remaining tasks

None.

User interface changes

UIs to handle bundles, same as for all entity types with bundles.

API changes

None.

Data model changes

  • New config entity type (consumers.type.*) to store bundle information.
  • New consumer entity type field that refers a consumer bundle (consumers.type.*).
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024