Added a template-filter for has_view_permissions

Did this so that I can check if the current logged on user is allowed to
view other pages than the one he is currently viewing.