Added a view check for permissions.