Ghost/core/server/models
Fabien O'Carroll 8046f4d437
🐛 Fix last seen for users (#10141)
* Added updateLastSeen method to user model

refs #10138

* Refactor codebase to use user.updateLastSeen

refs #10138

This is to ensure all updates go via the same method, meaning any
specific logic can be handled in one place, it also helps with grepping
the codebase to find where this occurs

* Created updateUserLastSeen middleware for v2 admin

refs #10138

This is intended to be used with the v2 admin api and _possibly_ the
content api, to give us an accruate report on thelast time a user access
a ghost instance.

* Wired updateUserLastSeen up to v2 Admin API

closes #10138

* Fixed broken test for v2 admin api

no-issue

This test was broken because it was incorrectly testing for a method to
be called exactly once - this was irrelevant to the functionality being
tested for.

* Updated user check method to set status to active

no-issue

* Debounced the updateUserLastSeen middlware an hour

no-issue

* Resolved some PR comments
2018-11-13 18:27:10 +07:00
..
base 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
plugins 🐛Fixed count.posts respecting co authors (#9830) 2018-08-30 17:05:29 +01:00
relations Updated Post and Author model permissible method (#9966) 2018-10-09 18:03:13 +07:00
accesstoken.js 🔥 Drop Node v4 Support 2018-05-01 14:06:18 +02:00
api-key.js Updated ApiKey onSaving to forward options (#9994) 2018-10-14 16:54:10 +07:00
app-field.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
app-setting.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
app.js Updated permittedOptions to correctly call super 2018-09-21 12:15:29 +02:00
client-trusted-domain.js Add table columns for OAuth 2015-09-02 13:39:22 +01:00
client.js Updated permittedOptions to correctly call super 2018-09-21 12:15:29 +02:00
index.js Added mobiledoc revisions functionality 2018-10-09 15:31:09 +02:00
integration.js Added HTTP BREAD for integrations resource (#9985) 2018-10-18 14:03:56 +01:00
invite.js Respected hasUserPermissions & hasAppPermissions in invite model 2018-10-16 18:00:05 +02:00
mobiledoc-revision.js Added mobiledoc revisions functionality 2018-10-09 15:31:09 +02:00
permission.js 🔥 Drop Node v4 Support 2018-05-01 14:06:18 +02:00
post.js 🐛 Fixed migration from v1 to 2.2.1 (#9984) 2018-10-11 09:04:47 +02:00
refreshtoken.js Switched to eslint-plugin-ghost (#9835) 2018-09-17 20:49:30 +02:00
role.js Stopped api key from assigning the 'Owner' role (#9971) 2018-10-12 15:38:57 +07:00
session.js Removed user_id constraint when upserting session (#10085) 2018-10-30 16:15:48 +07:00
settings.js Added session_secret setting to schema (#9953) 2018-10-05 12:25:51 +01:00
subscriber.js Updated permittedOptions to correctly call super 2018-09-21 12:15:29 +02:00
tag.js Refactor URL generation from models (#9917) 2018-10-03 15:44:30 +02:00
user.js 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
webhook.js Updated webhooks schema and add relation (#10018) 2018-10-17 18:17:13 +07:00