Problem/Motivation
All routes of the module require the permission administer earkiv_archive entity, but the module defines administer earkiv entities in earkiv.permissions.yml, which is also the admin_permission of both entity types. The permission in the routes does not exist and cannot be granted, so only user 1 and administrator roles can use the module. A user with the defined permission gets 403 on every page, but can still download the archive files, since file access follows the entity access.
The menu link of the settings page is placed under Content authoring (system.admin_config_content), while the page is at /admin/config/services/earkiv, under Web services.
Steps to reproduce
- Create a role with the permission "Administer E-Arkiv entities" and a user with that role.
- Log in as the user and go to /admin/content/earkiv or /admin/config/services/earkiv.
- Access is denied.
Proposed resolution
- Use
administer earkiv entitiesfor the settings page and the list pages. - Use entity access for the add and delete forms (
_entity_create_accessand_entity_access), so that they follow the access handler of the entity types. - Move the menu link of the settings page to Web services (
system.admin_config_services).
Remaining tasks
- Review.
User interface changes
The settings page is listed under Configuration > Web services. Users with "Administer E-Arkiv entities" can use the module.
API changes
None.
Data model changes
None.
AI-Generated: Yes (Used Claude Code to find the cause and draft this issue.)
Issue fork earkiv-3636840
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
thomas alsén commentedMerged into 1.0.x!