Implementing authorization against the database.