I have successfully made my 4 CRUD actions restful by using mapResources in the router config. but I need to filter which ones are actually RESTful. How do I filter which ones are RESTful? I don’t want to allow rest calls to the delete actions for example but I do however need to keep the delete action so I can moderate.
Share
I think you’re getting mixed up in buzzwords here. 🙂
All actions are by definition RESTful, it’s a concept built into the HTTP protocol. “Making an application RESTful” usually means, among other things, to actually use the concept of reacting differently to
GET,POST,PUTorDELETErequests on the same URL. E.g.Therefore, even if you do nothing, every request is always RESTful, because every request is using one of these HTTP methods (usually
GET).I think what you’re looking for is plain old user privileges handling using something like the
AuthComponent.