Currently, in my app, I’ve discovered that if you intercept a packet about to perform a delete command, you can change the ID to any id, and that object will get deleted, regardless if it belong to the person who made it or not.
So, my question is, is there a way to somehow make a global modification to the way destroy / delete works such that the current_user must own the item about to be deleted (or whatever other condition, as many apps are a bit more complicated than simple user ownership)
It is not a good idea to write global rule for destroy action. In the simplest way you just need to check access in your controllers:
Also you should look into CanCan gem