Validate user permissions
I was wondering what the best way is to validate user permissions. Let's say I have a user table that says what permissions they have. In this example, we'll say its creating new documents. The user posts a insert request to the documents table to create a new document. How can I validate that they have this permission?