Hi,
Reviewed this issue ,MR 1 applies cleanly.
This resolves issue mentioned in #3 that "Drupal's philosophy that the administrator role should have access to everything".Drupal version 9
Disabled field version 8.x-2.x-dev
Steps to reproduce were not clear so adding it here1. Install Drupal and mentioned module version, and enable it.
2. Create a role with limited access , here I have created Editor role.
3. Create a content type with some with field, you will find option to Disable field settings.
4. Select Disable for certain roles and select all roles for reproducing issue at first.
5. Add content and check filed is disabled for admin and editor role(with limited access).
6. Apply Patch 1 and check same field is now enabled for Admin role.
Adding before and after screenshot for Editor and admin roles.Hence patch works correctly.
RTBC +
- 🇫🇮Finland mlahde
I tried the patch, but it seems to do nothing in the 3.x code branch. When I briefly visited the current code, it has changed a lot and this is the only actual permission check done in the module:
public function addDisableFieldConfigFormToEntityForm(array &$form, FormStateInterface $form_state, string $form_id): void { if (!$this->currentUser->hasPermission('administer disable field settings')) { return; }
i.e. it check only if the user may administer disable field settings. There still some role based checks, related to
disable_field
settings