πŸ‡ΊπŸ‡ΈUnited States @audioroger

Bristol, VT
Account created on 12 July 2018, over 6 years ago
  • Senior Software Engineer at Red HatΒ  …
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States audioroger Bristol, VT

@delzhand @kerrivader Do y'all know if anyone is maintaining this project? I don't have access to push branches and create MRs on the project repo and we're maintaining three different patches in our codebase that I'd love to get into a new release, or at least into the dev branch.

We're currently using patches from:

  1. https://www.drupal.org/project/assembly/issues/3350991 πŸ› Error while fetching Assembly references Needs review
  2. https://www.drupal.org/project/assembly/issues/3286110 πŸ“Œ Automated Drupal 10 compatibility fixes Needs review
  3. https://www.drupal.org/project/assembly/issues/3488950 πŸ› Query Access Check error in 10.2.11 Active
πŸ‡ΊπŸ‡ΈUnited States audioroger Bristol, VT

The project repo doesn't allow me to push a branch for an MR review. I'm uploading a patch here.

πŸ‡ΊπŸ‡ΈUnited States audioroger Bristol, VT

audioroger β†’ created an issue.

πŸ‡ΊπŸ‡ΈUnited States audioroger Bristol, VT

I had a similar experience when renaming, disabling or deleting a custom permission. Any of these actions leads to an exception when saving the permissions from /admin/people/permissions.

RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "[permission-name]". in Drupal\user\Entity\Role->calculateDependencies() (line 207 of core/modules/user/src/Entity/Role.php).

The workaround I found was to first disable the custom permission for all user roles and save. Then rename, disable or delete the custom permission. In the case that you are renaming, you would then go back to the permissions page and re-enable the permission for the roles you removed it from.

Note: I have no idea how this works with translations.

More explicitly

Steps to reproduce

  1. Login as an Administrator
  2. Go to: /admin/people/custom-permissions/list
  3. Add a permission and save
  4. Open a new tab and go to: /admin/people/permissions
  5. Search for the custom permission added in step 3
  6. Enable it for any role below Administrator and save permissions
  7. Go back to: /admin/people/custom-permissions/list
  8. Rename, disable or delete the permission added in step 3 and save
  9. Go back to: /admin/people/permissions
  10. With no changes: Scroll down and click "Save permissions"

Behavior

Exception shown above

Expected Behavior

Permissions save without exception

Workaround

  1. Login as an Administrator
  2. Go to: /admin/people/custom-permissions/list
  3. Add a permission and save
  4. Open a new tab and go to: /admin/people/permissions
  5. Search for the permission from step 3
  6. Disable it for ALL ROLES below Administrator and save permissions
  7. Go back to: /admin/people/custom-permissions/list
  8. Disable, rename or delete the permission(s) from step 3 and save
  9. Go back to: /admin/people/permissions
  10. With no changes: Scroll down and click "Save permissions"

In the case of renaming the permission, re-enable it for all roles in step 9/10

Behavior

Permissions save without exception

Environment

Drupal core: 10.2.8
config_perms: 2.1.0

πŸ‡ΊπŸ‡ΈUnited States audioroger Bristol, VT

audioroger β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States audioroger Bristol, VT

Uploading the patch generated from https://git.drupalcode.org/project/readonlymode/-/merge_requests/4/diffs... based on comment 19.

Don't be mad y'all, I know there are plenty of conversations around uploaded patches vs. using MR generated patches locally. For me, I'm contributing this patch to another project that doesn't have local patches, so I want a permanent link. So far as I can tell this is not yet supported in GitLab.

Production build 0.71.5 2024