Description
Which Umbraco version are you using?
15.3.0
Bug summary
I am developing custom granular permissions.
My custom granular permissions allow for assigning permissions on a particular document type. So, e.g., I can allow publishing for all doc types except the specific ones.
During development this I have faced the issue related to the "Duplicate to" action.
I have dived into the code and found out that for the "Duplicate to" action, we request permissions for 2 nodes: for the node that we are trying to duplicate and the other one for its parent.
With the help of your AI assistant, I understood that we use parent here to determine whether the user has permissions to create a node under the parent or not:
So, if we use the parent node to find out that the user has permissions to create a node under the parent node, I think we have to use Umb.Document.Create
for the parent and Umb.Document.Duplicate
for the node being duplicated.
Currently, Umb.Document.Duplicate
permission is used for both the parent and the duplicated node.
I think it is wrong, and we should check Umb.Document.Create
for parent and Umb.Document.Duplicate for the node being duplicated.
Specifics
No response
Steps to reproduce
- Create the parent node
- Create the child node under the parent node
- Put breakpoint here
- Duplicate child node under the parent node
- Look at the debug info
Expected result / actual result
Expected: there are should be 2 checks: one for parent with Umb.Document.Create
, one for duplicating node with Umb.Document.Duplicate
Actual: there is only one check for both nodes.