dms icon indicating copy to clipboard operation
dms copied to clipboard

[18.0] dms: Broken access rules

Open LorenzoC0 opened this issue 6 months ago • 6 comments

Module

dms

Describe the bug

The write, unlink and create access permissions defined in the dms groups are not working as intended. Every operation is allowed regardless of the permissions the user has at that time.

To Reproduce

Affected versions:

  • [x] 18.0
  • [ ] 16.0 - Not affected

Steps to reproduce the behavior:

  1. Create a new access group with "Create access" and "Unlink access" active. Leave "Write access" unchecked.
  2. Make sure the user you're on is included in the access group
  3. Setup a storage with a root folder.
  4. Assign the newly created group to the root folder just created.
  5. Upload a file in the folder.
  6. Open Form view of the file.
  7. Create a new Tag and add it to the file
  8. Save.

Expected behavior The expected behavior after these steps is that the user should not be able to save the file since it does not have "Write access" as a permission.

LorenzoC0 avatar Jun 09 '25 14:06 LorenzoC0

https://github.com/user-attachments/assets/21a3477b-1498-44db-b549-62c12124e218

Here's a video of the issue on the latest Runboat

LorenzoC0 avatar Jun 09 '25 14:06 LorenzoC0

@LorenzoC0 trying to fix with https://github.com/OCA/dms/pull/435

eLBati avatar Jun 09 '25 14:06 eLBati

@kobros-tech @victoralmau any opinion about this? Thanks!

eLBati avatar Jun 09 '25 15:06 eLBati

@kobros-tech @victoralmau any opinion about this? Thanks!

Can you try something else rather than tag or category?

like update the name of the root folder.

kobros-tech avatar Jun 09 '25 16:06 kobros-tech

https://github.com/user-attachments/assets/d844beeb-4761-4413-865e-891558e27e3a

@kobros-tech Yes, here's a video editing the root folder, I hope it's not compressed too hard.

As you can see I cannot edit the name of the folder, but the error indicates a missing permission with the dms access group records. Then I tried to directly delete the folder on the kanban view and it successfully does so without Unlink access in the group of the user

LorenzoC0 avatar Jun 09 '25 16:06 LorenzoC0

IMO this has already been fixed https://github.com/OCA/dms/pull/436#issuecomment-2969488112

victoralmau avatar Sep 16 '25 15:09 victoralmau