Skip to content

Content permisisons check works incorrect during "Duplicate to" action #19269

Closed
@PeterKvayt

Description

@PeterKvayt

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:

Image

Image

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

  1. Create the parent node
  2. Create the child node under the parent node
  3. Put breakpoint here
  4. Duplicate child node under the parent node
  5. Look at the debug info

Image

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions