2013-09-02 05:49:08 +04:00
|
|
|
{
|
2013-09-14 22:04:41 +04:00
|
|
|
"core": {
|
2017-04-24 20:41:00 +03:00
|
|
|
"db_hash": {
|
2013-12-16 14:16:06 +04:00
|
|
|
"defaultValue": null
|
2014-01-03 19:50:03 +04:00
|
|
|
},
|
2017-04-24 20:41:00 +03:00
|
|
|
"next_update_check": {
|
2014-01-03 19:50:03 +04:00
|
|
|
"defaultValue": null
|
|
|
|
},
|
Update Notification improvements (#9123)
closes #5071
- Remove hardcoded notification in admin controller
- NOTE: update check notifications are no longer blocking the admin rendering
- this is one of the most import changes
- we remove the hardcoded release message
- we also remove adding a notification manually in here, because this will work differently from now on
-> you receive a notification (release or custom) in the update check module and this module adds the notification as is to our database
- Change default core settings keys
- remove displayUpdateNotification
-> this was used to store the release version number send from the UCS
-> based on this value, Ghost creates a notification container with self defined values
-> not needed anymore
- rename seenNotifications to notifications
-> the new notifications key will hold both
1. the notification from the USC
2. the information about if a notification was seen or not
- this key hold only one release notification
- and n custom notifications
- Update Check Module: Request to the USC depends on the privacy configuration
- useUpdateCheck: true -> does a checkin in the USC (exposes data)
- useUpdateCheck: false -> does only a GET query to the USC (does not expose any data)
- make the request handling dynamic, so it depends on the flag
- add an extra logic to be able to define a custom USC endpoint (helpful for testing)
- add an extra logic to be able to force the request to the service (helpful for testing)
- Update check module: re-work condition when a check should happen
- only if the env is not correct
- remove deprecated config.updateCheck
- remove isPrivacyDisabled check (handled differently now, explained in last commit)
- Update check module: remove `showUpdateNotification` and readability
- showUpdateNotification was used in the admin controller to fetch the latest release version number from the db
- no need to check against semver in general, the USC takes care of that (no need to double check)
- improve readability of `nextUpdateCheck` condition
- Update check module: refactor `updateCheckResponse`
- remove db call to displayUpdateNotification, not used anymore
- support receiving multiple custom notifications
- support custom notification groups
- the default group is `all` - this will always be consumed
- groups can be extended via config e.g. `notificationGroups: ['migration']`
- Update check module: refactor createCustomNotification helper
- get rid of taking over notification duplication handling (this is not the task of the update check module)
- ensure we have good fallback values for non present attributes in a notification
- get rid of semver check (happens in the USC) - could be reconsidered later if LTS is gone
- Refactor notification API
- reason: get rid of in process notification store
-> this was an object hold in process
-> everything get's lost after restart
-> not helpful anymore, because imagine the following case
-> you get a notification
-> you store it in process
-> you mark this notification as seen
-> you restart Ghost, you will receive the same notification on the next check again
-> because we are no longer have a separate seen notifications object
- use database settings key `notification` instead
- refactor all api endpoints to support reading and storing into the `notifications` object
- most important: notification deletion happens via a `seen` property (the notification get's physically deleted 3 month automatically)
-> we have to remember a seen property, because otherwise you don't know which notification was already received/seen
- Add listener to remove seen notifications automatically after 3 month
- i just decided for 3 month (we can decrease?)
- at the end it doesn't really matter, as long as the windows is not tooooo short
- listen on updates for the notifications settings
- check if notification was seen and is older than 3 month
- ignore release notification
- Updated our privacy document
- Updated docs.ghost.org for privacy config behaviour
- contains a migration script to remove old settings keys
2018-01-09 17:20:00 +03:00
|
|
|
"notifications": {
|
2016-07-22 16:02:10 +03:00
|
|
|
"defaultValue": "[]"
|
2013-09-14 22:04:41 +04:00
|
|
|
}
|
|
|
|
},
|
2013-09-02 05:49:08 +04:00
|
|
|
"blog": {
|
|
|
|
"title": {
|
2017-11-16 15:58:22 +03:00
|
|
|
"defaultValue": "Ghost",
|
|
|
|
"validations": {
|
|
|
|
"isLength": {
|
|
|
|
"max": 150
|
|
|
|
}
|
|
|
|
}
|
2013-09-02 05:49:08 +04:00
|
|
|
},
|
|
|
|
"description": {
|
2017-11-16 15:58:22 +03:00
|
|
|
"defaultValue": "The professional publishing platform",
|
|
|
|
"validations": {
|
|
|
|
"isLength": {
|
|
|
|
"max": 200
|
|
|
|
}
|
|
|
|
}
|
2013-09-02 05:49:08 +04:00
|
|
|
},
|
|
|
|
"logo": {
|
2017-06-08 18:36:14 +03:00
|
|
|
"defaultValue": "https://casper.ghost.org/v1.0.0/images/ghost-logo.svg"
|
2013-09-02 05:49:08 +04:00
|
|
|
},
|
2017-04-24 20:21:47 +03:00
|
|
|
"cover_image": {
|
2017-06-08 18:36:14 +03:00
|
|
|
"defaultValue": "https://casper.ghost.org/v1.0.0/images/blog-cover.jpg"
|
2017-01-23 12:13:52 +03:00
|
|
|
},
|
2017-01-25 13:02:02 +03:00
|
|
|
"icon": {
|
2017-01-23 12:13:52 +03:00
|
|
|
"defaultValue": ""
|
2013-09-02 05:49:08 +04:00
|
|
|
},
|
2017-05-31 18:05:49 +03:00
|
|
|
"default_locale": {
|
|
|
|
"defaultValue": "en",
|
2013-09-02 05:49:08 +04:00
|
|
|
"validations": {
|
2017-01-10 15:05:25 +03:00
|
|
|
"isEmpty": false
|
2013-09-02 05:49:08 +04:00
|
|
|
}
|
|
|
|
},
|
2017-04-24 20:41:00 +03:00
|
|
|
"active_timezone": {
|
2016-06-10 16:05:27 +03:00
|
|
|
"defaultValue": "Etc/UTC",
|
2016-02-02 10:04:40 +03:00
|
|
|
"validations": {
|
2016-07-26 12:23:20 +03:00
|
|
|
"isTimezone": true,
|
2017-01-10 15:05:25 +03:00
|
|
|
"isEmpty": false
|
2016-02-02 10:04:40 +03:00
|
|
|
}
|
|
|
|
},
|
2017-04-24 20:41:00 +03:00
|
|
|
"force_i18n": {
|
2013-09-15 01:39:31 +04:00
|
|
|
"defaultValue": "true",
|
2013-09-02 05:49:08 +04:00
|
|
|
"validations": {
|
2017-01-10 15:05:25 +03:00
|
|
|
"isEmpty": false,
|
2014-02-28 10:51:52 +04:00
|
|
|
"isIn": [["true", "false"]]
|
2013-09-02 05:49:08 +04:00
|
|
|
}
|
2013-11-21 22:44:18 +04:00
|
|
|
},
|
|
|
|
"permalinks": {
|
|
|
|
"defaultValue": "/:slug/",
|
|
|
|
"validations": {
|
2014-02-28 10:51:52 +04:00
|
|
|
"matches": "^(\/:?[a-z0-9_-]+){1,5}\/$",
|
2017-07-31 12:00:03 +03:00
|
|
|
"matches": "(:id|:slug|:year|:month|:day|:author|:primary_tag)",
|
2013-11-21 22:44:18 +04:00
|
|
|
"notContains": "/ghost/"
|
|
|
|
}
|
2014-07-31 23:36:20 +04:00
|
|
|
},
|
2017-01-17 18:40:06 +03:00
|
|
|
"amp": {
|
|
|
|
"defaultValue" : "true"
|
|
|
|
},
|
2014-07-31 23:36:20 +04:00
|
|
|
"ghost_head": {
|
|
|
|
"defaultValue" : ""
|
|
|
|
},
|
|
|
|
"ghost_foot": {
|
|
|
|
"defaultValue" : ""
|
2014-12-14 20:56:04 +03:00
|
|
|
},
|
2016-03-03 11:52:27 +03:00
|
|
|
"facebook": {
|
|
|
|
"defaultValue" : ""
|
|
|
|
},
|
|
|
|
"twitter": {
|
|
|
|
"defaultValue" : ""
|
|
|
|
},
|
2014-12-14 20:56:04 +03:00
|
|
|
"labs": {
|
2017-06-20 06:10:49 +03:00
|
|
|
"defaultValue": "{\"publicAPI\": true}"
|
2015-01-11 22:55:52 +03:00
|
|
|
},
|
|
|
|
"navigation": {
|
2015-02-25 20:20:42 +03:00
|
|
|
"defaultValue": "[{\"label\":\"Home\", \"url\":\"/\"}]"
|
2016-03-29 11:40:44 +03:00
|
|
|
},
|
|
|
|
"slack": {
|
|
|
|
"defaultValue": "[{\"url\":\"\"}]"
|
2017-08-15 17:59:16 +03:00
|
|
|
},
|
|
|
|
"unsplash": {
|
2017-09-19 12:56:45 +03:00
|
|
|
"defaultValue": "{\"isActive\": true}"
|
2013-09-02 05:49:08 +04:00
|
|
|
}
|
|
|
|
},
|
2013-09-14 22:04:41 +04:00
|
|
|
"theme": {
|
2017-04-24 20:41:00 +03:00
|
|
|
"active_theme": {
|
2013-09-15 01:39:31 +04:00
|
|
|
"defaultValue": "casper"
|
2013-09-02 05:49:08 +04:00
|
|
|
}
|
|
|
|
},
|
2014-01-21 12:45:27 +04:00
|
|
|
"app": {
|
2017-04-24 20:41:00 +03:00
|
|
|
"active_apps": {
|
2013-09-15 20:03:31 +04:00
|
|
|
"defaultValue": "[]"
|
|
|
|
},
|
2017-04-24 20:41:00 +03:00
|
|
|
"installed_apps": {
|
2013-09-15 01:39:31 +04:00
|
|
|
"defaultValue": "[]"
|
2013-09-02 05:49:08 +04:00
|
|
|
}
|
2015-08-24 14:43:26 +03:00
|
|
|
},
|
|
|
|
"private": {
|
2017-04-24 20:41:00 +03:00
|
|
|
"is_private": {
|
2015-08-24 14:43:26 +03:00
|
|
|
"defaultValue": "false"
|
|
|
|
},
|
|
|
|
"password": {
|
|
|
|
"defaultValue": ""
|
2017-10-05 13:07:32 +03:00
|
|
|
},
|
|
|
|
"public_hash": {
|
|
|
|
"defaultValue": null
|
2015-08-24 14:43:26 +03:00
|
|
|
}
|
2013-09-02 05:49:08 +04:00
|
|
|
}
|
2013-09-02 05:49:08 +04:00
|
|
|
}
|