Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: User can create an object with the copy/paste action without the permission created #690

Closed
amignotte opened this issue Sep 16, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@amignotte
Copy link

Pimcore version

2024.2

Steps to reproduce

  • Create a non admin user with the possibility to see Data-Object and in the workspaces to all permissions except creation/deletion on a folder and add another folder where it can create some other objects.
    In my example, I have a folder named Hotels where we stored the Hotels objects and I don't want the user Demo can create Hotels. I have another folder to store the Beds of the hotels, and I authorize the user to create Beds :

image
image

  • With your admin user create an Hotel object.

  • Log-in now with your Demo user.

  • Copy the hotel created by the admin user

  • Paste-it in the Room/Beds folder

Actual Behavior

As you can see, I can copy my hotel but I can't paste-it in the Hotels folder :
image
image

But if I go on my Rooms/Beds folder I can paste it :
image

And the hotel is now created under the hotel folder because we have an automatic tree folder according the type of the object :
image

Expected Behavior

The user can't be able to copy/paste an object when theses permissions rights doesn't allow him to create the object !

=> It's a critical issue because with this possibility the users can create any objects bypassing the creation rights.

Thanks for fix it as soon is possible for you :)

@kingjia90
Copy link
Contributor

Thank you for reporting!
Confirming the issue and tried to fix it by
#691

When the copied folder has some mixed classes, then it would need some warning (before) or log (after) to tell which files were actually copied and which one are skipped due to the lack of authorization.
Current PR is in draft as it would throw an exception and may be not user friendly

@robertSt7 robertSt7 added this to the 1.5.5 milestone Sep 20, 2024
@kingjia90
Copy link
Contributor

Fixed by #691

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants