Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
Go to file
Katharina Irrgang 5b77f052d9
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 15:20:00 +01:00
.github PRs don't need to squash commits anymore 2017-10-19 12:51:40 +01:00
content Upgrading Casper to 2.1.8 2018-01-03 13:49:21 +00:00
core Update Notification improvements (#9123) 2018-01-09 15:20:00 +01:00
.editorconfig Various post-repo-split cleanup (#6910) 2016-07-12 11:55:46 -06:00
.eslintrc.json Added Url Service to track all URLs in the system (#9247) 2017-11-16 13:03:24 +00:00
.gitignore Moved apps into web folder (#9308) 2017-12-06 17:37:54 +01:00
.gitmodules Add Admin-Client as submodule at core/client 2016-05-19 14:20:18 +01:00
.npmignore 🐛 Fixed missing mail templates in npm package (#9369) 2018-01-04 10:38:22 +01:00
.travis.yml Fixed comment about node version changes (#9223) 2017-11-08 00:27:47 +01:00
Gruntfile.js Moved utils/url.js to UrlService 2017-12-11 20:05:33 +01:00
index.js Import lib/common only 2017-12-12 10:28:13 +01:00
LICENSE 2018 2018-01-02 21:44:41 +00:00
MigratorConfig.js Moved ghost-version to lib 2017-12-14 22:14:55 +01:00
package.json Theme translations and blog localisation (#8437) 2018-01-09 14:50:57 +01:00
PRIVACY.md Update Notification improvements (#9123) 2018-01-09 15:20:00 +01:00
README.md 2018 2018-01-02 21:44:41 +00:00
SECURITY.md Update SECURITY.md 2016-01-13 18:22:09 +02:00
yarn.lock Theme translations and blog localisation (#8437) 2018-01-09 14:50:57 +01:00

Ghost Build status

The project is maintained by a non-profit organisation called the Ghost Foundation, along with an amazing group of independent contributors. We're trying to make publishing software that changes the shape of online journalism.

NOTE: If youre stuck, cant get something working or need some help, please head on over and join our Slack community rather than opening an issue.

 

Ghost

 

Hosting a live Ghost site

Ghost(Pro)

The easiest way to deploy Ghost is with our official Ghost(Pro) managed service. You can have a fresh instance up and running in a couple of clicks with a worldwide CDN, backups, security and maintenance all done for you.

Not only will it save you hours of maintenance per month, but all revenue goes to the Ghost Foundation, which funds the maintenance and further development of Ghost itself. So youll be supporting open source software and getting a great service at the same time! Talk about win/win. 🏆

Self-Hosters

Other options are also available if you prefer playing around with servers by yourself, of course. The freedom of choice is in your hands.

Theme Developers

If you are developing a Ghost theme for your own site or creating themes for others to use we recommend installing Ghost on your own local machine. Luckily we have a brand new Ghost CLI to make this really easy 😄

Contributors & Advanced Developers

For anyone wishing to contribute to Ghost or to hack/customise core files we recommend following our development setup guides:

Staying Up to Date

When a new version of Ghost comes out, you'll want to look over these upgrade instructions for what to do next.

You can talk to other Ghost users and developers in our public Slack team (it's pretty awesome).

New releases are announced on the dev blog. You can subscribe by email or follow @TryGhost_Dev on Twitter, if you prefer your updates bite-sized and facetious. 🎷🐢

 

Copyright & License

Copyright (c) 2013-2018 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.