We cannot rely on having 'package' in the context in resource_view_* auth functions, so fetch it from the resource_id. The CKAN fallback is not correct for resource/resource_views when the user is member of the organization but doesn't own the package.
Implement a full test suite, with both unit and functional tests