-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
suspend a user #8114
Merged
Merged
suspend a user #8114
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kevinansfield
added a commit
to kevinansfield/Ghost-Admin
that referenced
this pull request
Mar 8, 2017
requires TryGhost/Ghost#8114 - adds "Suspend User" option on user profile page with a modal confirmation screen
6 tasks
d851cc8
to
2874100
Compare
Ready to review/merge! |
kevinansfield
added a commit
to kevinansfield/Ghost-Admin
that referenced
this pull request
Mar 10, 2017
requires TryGhost/Ghost#8114 - adds "Suspend User" option on user profile page with a modal confirmation screen
- no logic must be adapted - we could also remove these tests, because it just reflects how the role permission system in Ghost works - owner can suspend all users except of owner - admin can suspend all users except of owner - editor can suspend author
- add a new event listener - when user is deactived, remove AT/RT [ci skip]
- to react on suspended users i had to reorder the logic a bit in the ghost strategy - it's a little bit hard to read the diff i think, but not much has changed here - return correct error message if user is supended (for both password and ghost auth) - can't be handled via the model layer (e.g. return suspended error from model layer), because findOne or findAll can be used in multiple places with different use cases [ci skip]
- we are changing the way ghost returns users - return all users by default (status: all) - ghost-admin will receive all active and inactive users and can decide which user can be suspended and which user can be unsuspended (depending on the permissions) - inactive is no longer a status a user can't be in - alternatively we could let the admin send GET /...../status=all for every request, but not my perseronal preference
- locked + inactive can't login [ci skip]
- test that tokens get deleted if a user get's deactivated - change the custom fixture logic (perms:x, user-token:x) [ci skip]
2874100
to
ef9adb6
Compare
kevinansfield
added a commit
to kevinansfield/Ghost-Admin
that referenced
this pull request
Mar 13, 2017
requires TryGhost/Ghost#8114 - adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen - separates team index into "active" and "suspended" users - adds "suspended" badge to user profile when suspended
kevinansfield
approved these changes
Mar 13, 2017
kirrg001
pushed a commit
to TryGhost/Admin
that referenced
this pull request
Mar 13, 2017
requires TryGhost/Ghost#8114 - adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen - separates team index into "active" and "suspended" users - adds "suspended" badge to user profile when suspended
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs #8111
This PR contains a new feature: suspending/un-suspending a user.
This branch was already tested with the Ghost-Admin PR.
Works as expected with ghost and password auth.
The key changes are
TODO'S