Add support for permission checking in views.