core icon indicating copy to clipboard operation
core copied to clipboard

[Permissions] Assets are not inheriting permissions from folders with individual permissions

Open joseorsini opened this issue 8 years ago • 3 comments

Current Behavior

If an asset is stored under a folder that has individual permissions, it should inherit permissions from it unless new individual permissions are assigned to the asset itself. Whenever individual permissions from parent permissionable objects are changed, and changes are cascaded, children assets should see the same permissions applied to them. This is not happening. Assets are not respecting individual permissions from its parent permissionable object and getting permissions from parent site.

Known Workarounds

None.

Steps to Reproduce (for bugs)

  1. On demo.dotcms.com site, create a folder called /downloads.
  2. After saving the folder, edit it back again and edit its permissions.
  3. Click on "Permission Individually" and uncheck all boxes related to CMS Anonymous role. Apply changes and cascade them to all children assets.
screen shot 2018-02-08 at 3 14 01 pm screen shot 2018-02-08 at 3 13 55 pm
  1. Upload a file under /downloads folder. save/publish it.
  2. Once the content is saved/published, open it again and check its permissions tab. It indicates it's inheriting permissions from demo.dotcms.com, where it should be inheriting permissions from /downloads folder
screen shot 2018-02-08 at 3 14 56 pm

Context

This affects customers who would like to disable view access to certain assets, and limit them to logged in users, as described on this ticket:

https://dotcms.zendesk.com/agent/tickets/95252

Flushing caches and running a full reindex does not do the trick.

Your Environment

  • dotCMS version used: 4.2.2.
  • Browser Name and version: Any Browser.
  • Operating System and version: Any OS.
  • Application Server and version: Any supported application server.
  • Java Brand and version: Any Java version.
  • Database and version: Any supported DB version.
  • Application module (if apply): N/A.

joseorsini avatar Feb 08 '18 21:02 joseorsini

This is working as expected. When you select only the checkbox at the Header level (gray row), you are selecting the Individual permission. That is for the folder itself, not inheritable. You have to expand the section, and select permissions for the children assets (inheritable). And it works by child type.. So to inherit Contributor permissions to Files, you need to expand the Contributor section, and select the checkbox for Content/Files. See attached screenshot: folderpermissions

acurionedotcms avatar Feb 12 '18 19:02 acurionedotcms

+1 - expected behavior is what Andre said. No child inherits anything from parent unless the role has "child" access to the object in the parent directory

DeanGonzalez avatar Feb 12 '18 20:02 DeanGonzalez

Thanks @acurionedotcms @DeanGonzalez I'll follow up with customer.

joseorsini avatar Feb 13 '18 16:02 joseorsini