Needs work
Project:
Fieldable Panels Panes (FPP)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Apr 2012 at 19:54 UTC
Updated:
8 Nov 2016 at 08:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
merlinofchaos commentedThat's odd. What, specifically, is linked to the delete right, do you know?
Comment #2
Argus commentedBesides the delete right also the revision right (@ admin/structure/panels/entity/view/%/revision): where all the revision actions are available: display, edit, delete, make current.
Comment #3
merlinofchaos commentedOkay so the revision list is attached to the 'administer' permission. It has nothing to do with 'delete', and I can't find anywhere in the code that it might be. Unless you mean that 'administer' includes 'delete' which is typical of an administer permission?
Comment #4
Argus commentedI attached a screenshot from the /admin/people/permissions page. With these settings the authenticated user (middle row) can change the revisions. When I disable the "Delete Panels pane" checkmark, the authenticated user cannot change the revisions.
The "Administer fieldable panels panes" setting also gives this permission.
Comment #5
merlinofchaos commentedOkay, I see what I did. I think the menu item must've been cut & pasted from delete.
So the real question is, what flag should that actually be. Need to check node and see what it does.
Comment #6
merlinofchaos commentedOk, node.module has an overall 'view revisions', 'revert revisions' and 'delete revisions' that is global. I could duplicate that, but I'm wondering if I should make it per bundle type.
Comment #7
Argus commentedIt is feasible that a different bundle type could require different permissions. That would give us a very fine grained access policy. So yes imho.
Comment #8
awebb commentedI would definitely be in favor of the granular bundle permissions myself.
Comment #9
Jason Dean commentedI'm just getting my head around this, but noticed that 'create new revision' seems selected by default.
My site doesn't use revisions so I want user to be able to deselect, which requires the 'Administer fieldable panels panes' permission. But I don't want them to be able to delete.
Comment #10
merlinofchaos commentedThe simplest thing to do is implement hook_form_alter and change the #default_value of that flag to 0.
Comment #11
dajjenHi I'm also interested in this functionality. Has anyone a patch for this?
Comment #12
damienmckennaI would favor having a generic set of revisions permissions but using them in tandem with the other CRUD permissions to identify the user's access.
Comment #13
sgdev commentedI've found a bug related to this issue. In
hook_menu, the Revisions menu item (admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision) is displayed if a user has the Delete permission for a given FPP entity, but throws a WSOD if the user clicks the menu item and does not have "administer fieldable panel panes."Comment #14
sgdev commentedHere's a first pass at creating a generic set of revisions permissions, in tandem with existing FPP entity access. Let me know your feedback, thanks.
Comment #15
sgdev commentedAttached is an update to #14. It includes a function to assign "view fieldable panels panes revisions" to all roles with "administer fieldable panels panes."
My preference would be to have the
fieldable_pane_entity_revisionsview permission use conditional logic, but obviously this is not possible. The next best option is to give it the "view fieldable panels panes revisions" perm, and make sure each admin role has the same perm.If we wanted to take this one step further, could make "view fieldable panels panes revisions" selected and disabled if "administer fieldable panels panes" is set. I don't know how else we can avoid the WSOD.
Comment #16
damienmckennaThis sounds good, but I think we need to add some tests to confirm what should happen.
Comment #17
sgdev commentedDamien, thanks for the feedback. Anyone available to help write some tests? I'm super busy at the moment.
Attached is an update to #15. Only change is modifying the
.installupdate from 7115 to 7117. This accounts for the new 7.x-1.11 release.Comment #18
sgdev commentedAfter reviewing patch #16 on Issue #2390145 (https://www.drupal.org/node/2390145#comment-11633601), it seems as though there needs to be some additional coordination.
Both patches modify the same code, but for different reasons.