Closed (fixed)
Project:
Prevent page deletion
Version:
8.x-1.0-alpha1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2019 at 19:28 UTC
Updated:
10 Sep 2019 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
joshahubbers commentedThanx you for your report. I Will look into it monday.
Comment #3
joshahubbers commentedThis patch removes the "allowed" return value. Now we only return forbidden if the node should not be removed, otherwise we return neutral so in fact we don't change anything except when the permission should be revoked.
Could you please test if this patch is sufficient?
Comment #4
joshahubbers commentedComment #5
krina.addweb commented@JoshaHubbers, Thanks for all the efforts. I tested your patch using simplytest.me. The patch works fine without 'delete homepage node' permission for anonymous user but when the anonymous user is given 'delete homepage node' permission, then it is not allowed to delete the page. PFA. Please look into it and do the needful. Correct me if I'm wrong.
Comment #6
joshahubbers commentedThank you for your comment @krina.addweb. But I cannot think of a situation in which I would give an anonimous user the permission to delete a homepage? The Drupal permission system works that if a permission is denied, this overrules all allowed permissions. So if the anonimous user does not have the "delete page" permission, the "delete frontpage" permission will obviously not work. I think this is how it is supposed to work...
Comment #7
BinaryBlock@JoshaHubbers I have tested locally and the patch appears to have solved this issue.
Comment #9
joshahubbers commentedComment #10
zipymonkey commentedThanks @JoshaHubber!