Add support for permission checking in views.
Adding in permissions