Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Nov 2016 at 19:53 UTC
Updated:
20 Aug 2019 at 06:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cilefen commentedComment #5
amwhalen commentedTaking a stab at a patch using the suggestion from pwolanin.
Comment #6
amwhalen commentedComment #7
anas_maw commentedThe last patch disable hook_node_access call on create, i think it should be called with operation 'create'
Comment #10
jhedstromI'm not following the comment in #7.
Shouldn't this be
!$node->isNew() && $node->access('delete')? Otherwise the delete button will be there on new content pages?However, if that is the case, it indicates a lack of test coverage for the delete button not appearing on node add forms...
Comment #12
m.abdulqader commentedReally confusing I want to edit the permission on creating some node and the $op value is delete.?
Comment #13
mikelutzThe parent call already checks if the node is new and decides whether to show the delete button or not (and does the access check). There's no reason for node_form to replace the access check, and it shouldn't modify the delete key unless it exists..
Comment #14
jhedstromAll tests still passing, and this removes the call to node access, so I think this is ready to go. It doesn't add a test, but I'm not sure a test is needed to ensure an access check isn't made--that would be a rabbit hole I think :)
Comment #17
larowlanComment #18
larowlanComment #20
larowlanCommitted 771adc4 and pushed to 8.8.x. Thanks!
c/p to 8.7.x