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.
Even with panalizer default permissions disabled for a user, they can still revert a panelized page to the default (wiping out all panalizer revisions) and then override the default panel with the buttons in IPE. I reused the core "Delete content revisions" and the ""administer panelizer @entity @bundle defaults" permissions to remove the buttons for users who do not have those permissions.
Comment | File | Size | Author |
---|---|---|---|
#8 | panelizer-n2283769-8.patch | 1.2 KB | DamienMcKenna |
Comments
Comment #1
frankcarey CreditAttribution: frankcarey commentedComment #2
DamienMcKennaUsing t() to insert values into a permission string is the incorrect approach to take, just insert the variables like so:
"administer panelizer $entity $bundle defaults"
Also, It's more correct to create the form element and set the '#access' attribute to the user_access() statement.
Comment #3
DamienMcKennaAlso, check how the revert option works now that #2218275: 'Reset' should not delete all {panelizer_entity} records for the entity has ben committed - it should no longer just delete all displays for all revisions.
Comment #4
DamienMcKennaComment #5
guillaumev CreditAttribution: guillaumev commentedAgreed with all of the above, and here is a new patch taking the comments into account.
Comment #6
guillaumev CreditAttribution: guillaumev commentedActually there was an issue with this patch. Here is the new one, which should work properly.
Comment #8
DamienMcKennaUpdate to use $handler->panelizer_access() instead of user_access().
Comment #10
DamienMcKennaCommitted.
FYI I'm adding a changenotice for this.