Feature registry – system description

Data model of the feature master, save rules, feature discovery and the link to the permission gate.

The feature master classifies every route + action key pair (UNMAPPED / BASE / SUBSCRIPTION / SYSTEM) and stores pricing, limit, dependencies and visibility. The permission gate (canAction, canSee) is built on this master.

Data model

Table names carry the installation's own prefix in the database.

TableRole
featurefeature: route, action key, name, classification, list price, currency, period, limit (metric, value, unit, period), parent, menu, visibility rule
feature_to_storewebsite assignment
feature_discounttime-limited discounts
feature_dependencyread dependencies on other modules
user_feature, subscription_plan, subscription_plan_featureread: usage (getUsage)

Process

  1. List: filter by module, classification, gap (filter_gap: no permission seed / no gate), website and text; the coverage summary at the top.
  2. Save only for an existing feature (error_not_found); list price numeric; discount: price below list price, start ≤ end; limited type needs metric and positive value. saveFeature(): classification whitelisted, period monthly/yearly/once, visibility auto/always/never, websites and discounts replaced, dependencies; then the feature and entitlement caches are cleared.
  3. Bulk: bulk (classification), bulkstore (website).
  4. Discovery (scan): walks the admin controllers, unites the keys checked in code with those in the permission catalogue, adds or updates rows (default UNMAPPED) and returns added, updated, missing-seed and ungated counts. Without the schema: error_schema.

Permissions

  • Function rights: list; edit (form, bulk, bulkstore); save canSave(); scan; debug. The interface creates no new features; the add key is not in the catalogue.
  • No content scope (system data).