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

improvement: validate timezones #7143

Merged

Conversation

kirrg001
Copy link
Contributor

@kirrg001 kirrg001 commented Jul 25, 2016

no issue

Validate timezones before saving to the database.
Right now: it is possible to set any value for activeTimezone. That results in an unwanted state of moment, because it complains that the given timezone is unknown. This PR adds validation to the schema - so you can only save timezones which are available (we check against the timezones json file)

@kirrg001 kirrg001 force-pushed the improvement/validate-timezones branch from 228b905 to 0f39f38 Compare July 25, 2016 18:25
@kirrg001 kirrg001 changed the title [WIP] improvement: validate timezones improvement: validate timezones Jul 25, 2016
no issue
- add isTimezone to schema validation
@kirrg001 kirrg001 force-pushed the improvement/validate-timezones branch from 0f39f38 to dd55960 Compare July 26, 2016 09:06
@kevinansfield kevinansfield merged commit c9dc367 into TryGhost:master Jul 26, 2016
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this pull request Jul 26, 2016
refs TryGhost/Ghost#7142, TryGhost/Ghost#7143
- moves timezone selection template and logic into a component
- detect if the current `activeTimezone` is not in our pre-defined list of timezones, if it isn't:
  - add a line indicating that there has been a manual override with the current `activeTimezone` value
  - add a blank option to the timezone select list
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this pull request Jul 26, 2016
refs TryGhost/Ghost#7142, TryGhost/Ghost#7143
- moves timezone selection template and logic into a component
- detect if the current `activeTimezone` is not in our pre-defined list of timezones, if it isn't:
  - add a line indicating that there has been an override with the current `activeTimezone` value
  - add a blank option to the timezone select list
chris-brown pushed a commit to chris-brown/Ghost that referenced this pull request Aug 14, 2016
no issue
- add isTimezone to schema validation
geekhuyang pushed a commit to geekhuyang/Ghost that referenced this pull request Nov 20, 2016
no issue
- add isTimezone to schema validation
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.

None yet

2 participants