Task #3627415: Use Entity API permission, access and query access handlers for Mapillary entities
Uses the Entity API handlers for the Mapillary entity types, as proposed in the issue.
Content entity types (mapillary_image, mapillary_sequence, mapillary_map_feature, mapillary_detection, mapillary_organization):
EntityPermissionProvider,EntityAccessControlHandler,QueryAccessHandler,AdminHtmlRouteProviderandDefaultEntityLocalTaskProvider.permission_granularity: 'bundle'on the four bundleable types.- The
administer mapillary_*entries are removed from the permissions YAML. The provider generates them with the same names and providing modules, so existing role assignments keep working.
Bundle entity types use BundleEntityAccessControlHandler.
Admin Views:
- New Views access plugin
mapillary_entity_overview: grants access with the admin or the overview permission of an entity type, like the entity collection route. The corepermplugin checks one permission only, so per-type admins without the overview permission got a 403. - The five admin Views use it instead of
administer mapillary. Rows are filtered by query access.
Post-update hooks (in mapillary_entity, mapillary_map_feature, mapillary_detection, mapillary_organization):
- Switch the admin view displays that still have the shipped access setting to the new plugin.
- Grant
access {entity_type} overviewandview {entity_type}to roles withadminister mapillary, so their listings stay visible. This is a separate function and can be dropped if automatic grants are not wanted.
Behavior change: administer mapillary alone no longer opens the entity listings.
Tests: kernel tests for handlers, generated permissions, routes, the access matrix, query access, bundle label access and the post-update hooks; a functional test for the collection route, bundle-filtered Views rows and the View and Edit tabs. MapillaryAdminViewsTest and MapillaryOrganizationsAdminViewTest now use the overview permissions.
README and CHANGELOG updated.
Closes #3627415