[Permissions] Content Types do not show Permissions if Site/Folder value is a Folder
If we create/update a content type and set its Site/Folder value to a Folder, the system doesn't show the permissions this content type is inheriting. It should show it's inheriting from its parent folder.
Now, if we create assets under this Folder, we can see that new files are inheriting permissions from it.
Expected Behavior
If a folder is set on Site/Folder attribute of a Content Type, then permissions should reflect it's inheriting permissions from this parent object, in the same way it does if a Site was selected.
Current Behavior
An empty permissions list is displayed.
Possible Solution
Check permissions inheritance for content type if a Site or Folder is selected. By switching values here, we should:
- Show consistently where it's inheriting permissions from.
- Update permissions once the value is updated.
- Question: If a content type has individual permissions and this Site/Folder attribute is changed, should we reset permissions here?
Known Workarounds
Steps to Reproduce (for bugs)
- Create a folder called /uploads on demo.dotcms.com site.
- Create a File-type Content Type called "User Upload". Select "demo.dotcms.com/uploads" folder as its Site/Folder value:
- Check its permissions tab. Shows empty, and should show permissions are inherited from this folder.
- Go to Site Browser and upload a User Upload file to it.
- Once it's uploaded, check its permissions. It's inheriting permissions from demo.dotcms.com site
Context
Reported by customer: https://dotcms.zendesk.com/agent/tickets/94881
Your Environment
- dotCMS version used: 4.2.x.
- Browser Name and version: Any Browser.
- Operating System and version: Any OS.
- Application Server and version: Any Application Server.
- Java Brand and version: Any Supported Java 8 Server.
- Database and version: Any DB.
- Application module (if apply): N/A.
PR: https://github.com/dotCMS/core/pull/13528
Passed QA
After creating a File type Content Type called "User Upload" and selecting "demo.dotcms.com/uploads" folder as its Site/Folder value, permissions tab is actually showing.

Then I uploaded file to "User Upload" and checked its permissions. It's inheriting permissions from demo.dotcms.com site

Mac OS 10.10 / Postgres 9.6 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8
Note to QA: please test the following scenarios:
- Create content type that lives under demo.dotcms.com. Make sure content type's permissions are inherited from demo.
- Create content type that lives under folder, which inherits permissions from demo.dotcms.com. Make sure content type's permissions are inherited from demo.
- Create content type that lives under folder, which has individual permissions (you need to check everything under 'Contributor' Role). Make sure content type's permissions are inherited from folder with individual perms.
Passed QA. Tested scenarios mentions on "Note to QA"
- Created a content type that lives under demo.dotcms.com and verified that content type's permissions are inherited from demo.

- Created a content type that lives under folder, which inherits permissions from demo.dotcms.com and verified that content type's permissions are inherited from demo.

- Created content type that lives under folder, which has individual permissions and verified that content type's permissions are inherited from folder with individual perms.

Mac OS 10.10 / Postgres 9.6 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8