Needs review
Project:
Custom Links
Version:
6.x-1.4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
20 Sep 2010 at 19:12 UTC
Updated:
25 Dec 2010 at 15:28 UTC
Jump to comment: Most recent file
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
henrijs.seso commentedno, we just have to check if user is author or not, looks like an easy fix.
Comment #2
henrijs.seso 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
henrijs.seso commentedchanged patch file name without #.
Comment #4
henrijs.seso commentedone line missed spaces in stead of tabs. sorry.
Comment #5
skizzo commentedPatch #4 applies cleanly (before 927022.patch and 696302.patch) and fixes the bug. Thank you.