core icon indicating copy to clipboard operation
core copied to clipboard

Enhancement: Improve default in Host or Folder field

Open jkshapiro opened this issue 11 years ago • 4 comments

If a user creates a new contentlet that has a Host or Folder field, the default value for the field may be a folder to which the user is not permissioned. This should not happen. It's perverse to provide a user with a default value that doesn't work.

jkshapiro avatar Apr 22 '15 15:04 jkshapiro

If a Content-Type has a Host or Folder field that is not required the value set by default is System Host regardless if is a limited user without permissions over the System Host. We should add a default value field like the one on the Date Field and if there is no default value set it, we should set it to the first folder or host that the user has permissions.

Client Ticket Related: https://my.dotcms.com/tickets/detail.dot?id=ae01967a-fc61-4d7f-8182-80f27f39867e

erickgonzalez avatar May 24 '16 20:05 erickgonzalez

PR: https://github.com/dotCMS/core/pull/9982

agomez-dotcms avatar Oct 17 '16 14:10 agomez-dotcms

Hi Guys, the default-value for "host of folder" field currently depends on whether the field is required/mandatory or not:

  1. Required: The field is set to the host where the user is editing content in.
  2. Not Required: The field is set to the System Host. Here there might be an issue if the user does not have access permissions to the System Host. This seem to be the case reported in this ticket

A Pull Request has been issued to fix this issue (https://github.com/dotCMS/core/pull/9982). Basically, if the field is Not Required and the user does not have permissions to System Host, the system now sets it to the host where the user is editing content in.

agomez-dotcms avatar Oct 17 '16 14:10 agomez-dotcms

Passed QA. System Host is not the default for Site or Folder field when limited user has no access to System Host. Default value is the first folder or host where the user has permissions. Screenshot below shows that limited user has access only to Test QA Site, not to System Host image

Tested on master-3.7 // Ubuntu 14.04.1 // Postgres 9.3.5 // Chrome and FF

shaydotcms avatar Oct 21 '16 03:10 shaydotcms