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.
| Table | Role |
|---|---|
feature | feature: route, action key, name, classification, list price, currency, period, limit (metric, value, unit, period), parent, menu, visibility rule |
feature_to_store | website assignment |
feature_discount | time-limited discounts |
feature_dependency | read dependencies on other modules |
user_feature, subscription_plan, subscription_plan_feature | read: usage (getUsage) |
Process
- List: filter by module, classification, gap (
filter_gap: no permission seed / no gate), website and text; the coverage summary at the top. - 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, periodmonthly/yearly/once, visibilityauto/always/never, websites and discounts replaced, dependencies; then the feature and entitlement caches are cleared. - Bulk:
bulk(classification),bulkstore(website). - 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); savecanSave();scan;debug. The interface creates no new features; theaddkey is not in the catalogue. - No content scope (system data).