Enhancement: Improve default in Host or Folder field
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.
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
PR: https://github.com/dotCMS/core/pull/9982
Hi Guys, the default-value for "host of folder" field currently depends on whether the field is required/mandatory or not:
- Required: The field is set to the host where the user is editing content in.
- 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.
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

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