Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a role does not have any permissions set, it prevents other roles (that come after it in alphabetical order) from having their permissions set correctly.
To test setup an 'aardvark' role and don't assign it any permissions.
Line 197 in secure_permissions_build_permissions() appears to be at fault. It stops it looping if a role has doesn't have any permissions set.
Comment | File | Size | Author |
---|---|---|---|
#7 | secure_permissions-permissions-not-set-bug-1406892-d7-7.patch | 921 bytes | Xen |
#6 | secure_permissions-permissions-not-set-bug-1406892-d7-6.patch | 1.38 KB | kasperg |
#2 | secure_permissions-permissions-not-set-bug-1406892.patch | 1.42 KB | tunny |
Comments
Comment #1
agentrickardSince this can be mitigated (by setting a permission), I don't see it as critical.
I wrote this module to prove a point. It needs a new maintainer.
Patches welcome.
Comment #2
tunny CreditAttribution: tunny commentedPatch attached.
This works for me. However it will need double checking.
If a role isn't defined in the exported settings, it will now lose all its permissions. Is this correct behaviour?
Comment #3
agentrickardProbably. Given that exporting an empty role would be a destructive act.
Comment #4
mikebell_ CreditAttribution: mikebell_ commentedWe've been using this in production for a few months now without any issues.
If someone else wants to review then I'll commit it.
Comment #5
Cameron Tod CreditAttribution: Cameron Tod commentedPatch looks fine to me.
Comment #6
kasperg CreditAttribution: kasperg commentedRan into the same problem for the Drupal 7 1.5 version of the module.
Here is a patch for that.
Comment #7
Xen CreditAttribution: Xen commentedTypo in previous patch, this fixes that.
Comment #8
ultimateboy CreditAttribution: ultimateboy commentedThanks all. Committed to 7.x.
http://drupalcode.org/project/secure_permissions.git/commit/f72dc8c631f7...