Closed (outdated)
Project:
Diff
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2010 at 05:41 UTC
Updated:
16 Dec 2024 at 19:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
realityloop commentedOnly for Inline diffs, not the revisions tab.
Comment #2
realityloop commentedPutting this here for reference:
http://drupal.org/node/880940
Comment #3
drupalninja99 commented+1 and we need a permission asap (please) for the 'view changes' field as well, it auto-turns on for every content type and any user has access to the view changes button, we really need a 'view changes' permission attached to that.
Comment #4
realityloop commented@jaykali could you please test this patch against dev from 2010-Aug-13, it has perm for 'view changes button' as you requested as well.
I've added support here for people that want to use my patch at #2 as well.
I fear that 'view inline diff' perm may be somewhat redundant now that the inline diff uses a block, meaning you can apply role based access to it there.
I'd like expand these perms per content type in line with my patch at #2 if people think it would be useful. I will need to discuss it with other maintainers of Diff as well though.
Comment #5
yhahn commentedSome feedback:
A clearer sense of how the different permissions interact with each other would be good. For example, the new check for inline diffs appears to be this:
Where the
view inline diffperm becomes mostly a negative check - e.g. you must have it in addition to theview revisionspermission. I think this makes sense but I wonder if there are use cases where site builders might want the opposite - e.g. users who can view diffs inline without being pestered by the revisions tab.The next action here is to spell out explicitly (perhaps in the comment block above
hook_perm()) what each permission does and how it relates to permissions not provided by diff (ie.view revisions).More consistent permission naming. I've never been a fan of the phrase
view inline diffand now that we are adding additional perms for other aspects of diff I wonder if a good set might be:view diffAllows users to see side-by-side diffs for revisions.
view diff inlineAllows users to see inline diffs.
view diff previewAllows users to see diff preview when editing nodes.
Comment #6
realityloop commentedYhahn, good points.
My aim was to create a way to enable inline diff without the revisions tab eventually, I just wasn't sure how, but you've given me something to try.
I'll do some work and reroll a patch early next week.
Comment #7
realityloop commentedyhahn: I've done some further work on this, unfortunately I'm stuck on how to remove the requirement for 'view revisions'.
line 112 of diff.module calls:
_node_revision_access() requires the users to have at least 'view revisions' perm, any ideas?
Once I can figure this out I'll do clean up and submit a final patch.
Comment #8
Taxoman commentedIs this development currently done on 6.x or 7.x?
Comment #9
alan d. commentedAnd is this still relevant as per the comment in #1013146: Need More Granular Permissions?
Comment #10
mitchell commentedBumping to 7.x-3.x.
Comment #11
heddnGiven the proximity of EOL for Drupal 7, marking this as won't fix. The likely final Drupal 7 release of diff has landed in https://www.drupal.org/project/diff/releases/7.x-3.5. If this is something still applicable to a more modern version of the module, feel free to re-open and post additional notes.