0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/models
Naz c84866dda7
Improved password reset and session invalidation for "locked" users (#11790)
- Fixed session invalidation for "locked" user
  - Currently Ghost API was returning 404 for users having status set to "locked". This lead the user to be stuck in Ghost-Admin with "Rousource Not Found" error message.
  - By returning 401 for non-"active" users it allows for the Ghost-Admin to redirect the user to "signin" screen where they would be instructed to reset their password

- Fixed error message returned by session API
  - Instead of returning generic 'access' denied message when error happens during `User.check` we want to return more specific error thrown inside of the method, e.g.: 'accountLocked' or 'accountSuspended'
  - Fixed messaging for 'accountLocked' i18n, which not corresponds to the
actual UI available to the end user

- Added automatic password reset email to locked users on sign-in
  - uses alternative email for required password reset so it's clear that this is a security related reset and not a user-requested reset

- Backported the auto sending of required password reset email to v2 sign-in route
  - used by 3rd party clients where the email is necessary for users to know why login is failing

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-05-05 19:37:53 +01:00
..
base Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
plugins Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
relations Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
action.js Added model implementation for actions 2019-02-06 21:36:09 +01:00
api-key.js Added new endpoint for refreshing api key secret (#11791) 2020-05-05 23:36:21 +05:30
author.js
email.js Added default stats object to email model 2019-11-08 17:11:54 +07:00
index.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
integration.js Ensured Admin API cannot fetch internal integrations (#10501) 2019-07-24 11:52:55 +02:00
invite.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
label.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
member-stripe-customer.js Added upsert method to stripe models 2019-10-09 16:24:51 +07:00
member.js Added member.avatar_image for member gravatars in themes (#11584) 2020-02-19 10:08:12 +00:00
mobiledoc-revision.js
permission.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
post.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
posts-meta.js Updated post model url transforms for posts/posts_meta split (#11223) 2019-10-09 13:38:08 +01:00
role.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
session.js
settings.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
stripe-customer-subscription.js Prefixed stripe_customers_subscriptions with members 2019-10-09 16:24:51 +07:00
tag-public.js
tag.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
user.js Improved password reset and session invalidation for "locked" users (#11790) 2020-05-05 19:37:53 +01:00
webhook.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00