-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Description
Type : Feature
Bug : No
The request only accepts CRUD and forceDelete gates, and it is not customizable.
https://laravel-rest-api.lomkit.com/endpoints/search#gates
We can manually add gates to a resource by extending the buildGatesForModel method in Lomkit\Rest\Http\Response, but requests using Lomkit\Rest\Rules\SearchRules do not expect this in the validate method:
$attribute.'gates' => ['sometimes', 'array', Rule::in(['viewAny', 'view', 'create', 'update', 'delete', 'restore', 'forceDelete'])],
It's possible to create a getGatesKey method in controller (or resource) or something like this to override the default gates ?
Metadata
Metadata
Assignees
Labels
No labels