feat(forms): add form_binding, form_subjects, form_filter_registry, form_builder configs
Groundwork for S2+ services. Entity Column Registry whitelists valid Pattern A/C binding targets; subject-type registry enforces morph-map; filter registry separates filterable columns from bindable ones; builder config holds limits, webhook policy, captcha, retention, feature flags. Adds dedicated 'webhooks' Redis queue connection (retry_after 120s). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
52
api/config/form_subjects.php
Normal file
52
api/config/form_subjects.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Subject Type Registry
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Authoritative list of subject_type values permitted on form_submissions.
|
||||
| Must match morph-map keys registered in AppServiceProvider.
|
||||
|
|
||||
| 'permission_check' format: '<PolicyClass>@<method>' — invoked to authorise
|
||||
| access to a submission for this subject. Omit when policy doesn't exist yet.
|
||||
|
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
'person' => [
|
||||
'model' => \App\Models\Person::class,
|
||||
'display_attribute' => 'name',
|
||||
'permission_check' => \App\Policies\PersonPolicy::class.'@view',
|
||||
],
|
||||
|
||||
'user' => [
|
||||
'model' => \App\Models\User::class,
|
||||
'display_attribute' => 'name',
|
||||
// TODO: add permission_check when UserPolicy is built (S2)
|
||||
],
|
||||
|
||||
'company' => [
|
||||
'model' => \App\Models\Company::class,
|
||||
'display_attribute' => 'name',
|
||||
'permission_check' => \App\Policies\CompanyPolicy::class.'@view',
|
||||
],
|
||||
|
||||
'organisation' => [
|
||||
'model' => \App\Models\Organisation::class,
|
||||
'display_attribute' => 'name',
|
||||
'permission_check' => \App\Policies\OrganisationPolicy::class.'@view',
|
||||
],
|
||||
|
||||
'event' => [
|
||||
'model' => \App\Models\Event::class,
|
||||
'display_attribute' => 'name',
|
||||
'permission_check' => \App\Policies\EventPolicy::class.'@view',
|
||||
],
|
||||
|
||||
// 'artist' entry added when artist module lands
|
||||
|
||||
];
|
||||
Reference in New Issue
Block a user