Disable "Details" GET/HEAD Request #774
Replies: 4 comments 1 reply
-
Hey @pxpm I tested this and @mariovillani is right about this. Endpoints (URL) are always open!🚨 https://backpackforlaravel.com/docs/6.x/crud-api#details-row $this->crud->disableDetailsRow(); // hides it from UI only
// I doubt the following are working.
$this->crud->allowAccess('details_row');
$this->crud->denyAccess('details_row'); |
Beta Was this translation helpful? Give feedback.
-
Hey @mariovillani I have escalated the issue here Laravel-Backpack/CRUD#5395 We will try to come up with the appropriate resolution soon. Thanks for reporting! |
Beta Was this translation helpful? Give feedback.
-
Thanks @mariovillani . I totally agree with you, and also including @karandatwani92 observations about the DetailsRow should probably be their own operation, and also have a little bit more flexibility in terms of permissions (you may want to show details rows of I've written a little bit more detailed answer in the PR thread Laravel-Backpack/CRUD#5397 I will be closing this so that we keep any conversation regarding to this in the PR thread. Thanks again 🙏 |
Beta Was this translation helpful? Give feedback.
-
It's merged and tagged in CRUD 6.4.1 🙏 Updated docs here: https://backpackforlaravel.com/docs/6.x/crud-operation-list-entries#details-row-1 Thanks @mariovillani and @karandatwani92 👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
At the moment, it is impossible to disable the GET|HEAD endpoint for the getDetailsRow functionality.
Even if someone is not using getDetails in the CRUDController, the route is loaded in any case.
When the ListTrait is loaded, no checks are done if the getDetailsRow has been enabled or not for the current CRUDController. I've highlighted where the check should be done (the comment written in uppercase):
A possibile fix (in my opinion the cleanest one) would be creating a new Operation which is only for the getDetails functionality, separating the business logic.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions