Add a permission service and refactor filters