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.
for links like node/nid/delete if viewer permission is set to 'delete any content' and author permission is set to 'delete own content' no links are displayed for author, because viewer permission check is first and since it is rarely same user has permission to delete own content AND delete any content, no links are displayed.
idea is to check for author OR viewer permission, not author AND viewer permission.
i'm on it.
Comments
Comment #1
mansspams CreditAttribution: mansspams commentedno, we just have to check if user is author or not, looks like an easy fix.
Comment #2
mansspams CreditAttribution: mansspams commentedThis patch will 1) fix permission bug 2) add token support for permission names. Making 2 fixes in same patch, because same code are responsible for both issues.
Bug was that code worked in viewer and author cases, but broke when viewer and author were same user. Now viewer permissions are checked seperatly - only for viewer if user is viewer (or 'NOT author' since there are only two cases) and only for author if user is author.
Comment #3
mansspams CreditAttribution: mansspams commentedchanged patch file name without #.
Comment #4
mansspams CreditAttribution: mansspams commentedone line missed spaces in stead of tabs. sorry.
Comment #5
skizzo CreditAttribution: skizzo commentedPatch #4 applies cleanly (before 927022.patch and 696302.patch) and fixes the bug. Thank you.