Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(edit-content): add validation to current path #28933

Merged

Conversation

nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Jun 18, 2024

If the siteFolder field is required, it defaults to current host
If the siteFolder field is not required, it defaults to system host

Proposed Changes

  • Add empty path validation
  • Call currentSite() if required
  • Select 'System Host' if not required

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Screenshots

If the siteFolder field is not required, it defaults to system host.

Screenshot 2024-06-19 at 10 01 36 AM

If the siteFolder field is required, it defaults to current host

Screenshot 2024-06-19 at 10 03 18 AM

This PR fixes: #28925

@nicobytes nicobytes linked an issue Jun 18, 2024 that may be closed by this pull request
@nicobytes nicobytes marked this pull request as ready for review June 19, 2024 14:05
…-host' of github.com:dotCMS/core into 28925-if-no-value-we-should-default-to-current-selected-host
@nicobytes nicobytes enabled auto-merge June 19, 2024 14:30
@nicobytes nicobytes requested a review from rjvelazco June 19, 2024 15:46
@nicobytes nicobytes requested a review from zJaaal June 19, 2024 16:20
@zJaaal zJaaal changed the title edit-content: add validation to current path chore(edit-content): add validation to current path Jun 19, 2024
@nicobytes nicobytes requested a review from hmoreras June 19, 2024 16:35
@nicobytes nicobytes added this pull request to the merge queue Jun 19, 2024
Merged via the queue into master with commit d61593e Jun 19, 2024
16 checks passed
@nicobytes nicobytes deleted the 28925-if-no-value-we-should-default-to-current-selected-host branch June 19, 2024 18:18
oidacra pushed a commit that referenced this pull request Jun 26, 2024
If the siteFolder field is required, it defaults to current host
If the siteFolder field is not required, it defaults to system host

### Proposed Changes
* Add empty path validation
* Call currentSite() if required
* Select 'System Host' if not required

### Checklist
- [x] Tests
- [x] Translations
- [x] Security Implications Contemplated (add notes if applicable)


### Screenshots

If the siteFolder field is not required, it defaults to system host.

![Screenshot 2024-06-19 at 10 01
36 AM](https://github.com/dotCMS/core/assets/7611944/442e490d-87be-451f-acc8-4d5c8572b084)

 If the siteFolder field is required, it defaults to current host

![Screenshot 2024-06-19 at 10 03
18 AM](https://github.com/dotCMS/core/assets/7611944/9a112eb8-76e3-4200-b527-d59842dd432e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If no value, we should default to current selected host
3 participants