[NEW] API users.logoutOtherClient to logout from other locations#16193
Conversation
9f618ed to
594ba18
Compare
MarcosSpessatto
left a comment
There was a problem hiding this comment.
@jschirrmacher First of all, thanks for the PR and for the tests. I left some comments on your PR.
573edfc to
d89f0ff
Compare
|
@jschirrmacher can you take a look on the broken tests? |
|
Tests work now as expected |
|
@MarcosSpessatto Can you please re-evaluate the PR? |
rodrigok
left a comment
There was a problem hiding this comment.
I'm suggesting to change from logoutOtherClients to removeOtherTokens since the first one will remove even the token used to execute the API call. The second we use to reset all the other tokens when changing the password introduced by this PR where we added some changes to get the correct session token from the API call as well.
It's not necessary to use Meteor.runAsUser anymore since the same PR, not the API will run in an invocation already containing the session.
The Try Catch is not necessary as well since all the APIs run inside a global Try Catch wich already call the API.v1.failure method with the error.
Co-Authored-By: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-Authored-By: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
…4892-wreiske-user-status-bubbles * 'develop' of github.com:RocketChat/Rocket.Chat: (540 commits) [FIX] Show error message if password and confirm password not equal (RocketChat#16247) [FIX] Message quote button inside threads (RocketChat#16925) Fix wrong imported library meteor/tap:i18n lint [IMPROVE] User gets feedback when a message has been starred or unstarred (RocketChat#13860) [FIX] admin can sort users by email in directory view (RocketChat#15796) [FIX] Pinned messages wouldn't collapse (RocketChat#16188) [IMPROVE] Added border to page header. (RocketChat#16792) [FIX] Correct thread messages display in context bar. (RocketChat#16835) [FIX] Public channel cannot be acessed via URL when 'Allow Anonymous Read' is active (RocketChat#16914) Fixed Line break incorrectly being called apostrophe (RocketChat#16918) [IMPROVE] Context menu autofocus (RocketChat#16915) Improve room types usage (RocketChat#16753) [NEW] API `users.deactivateIdle` for mass-disabling of idle users (RocketChat#16849) [NEW] API to logout from other locations (RocketChat#16193) [IMPROVE] Add option to require authentication on user's shield endpoint (RocketChat#16845) [FIX] Custom OAuth Bug (RocketChat#16811) [FIX] Integrations page pagination (RocketChat#16838) reset package-lock to upstream Apply suggestions from code review ...
…ultiple-users* 'develop' of github.com:RocketChat/Rocket.Chat: (53 commits) [FIX] Show error message if password and confirm password not equal (#16247) [FIX] Message quote button inside threads (#16925) Fix wrong imported library meteor/tap:i18n lint [IMPROVE] User gets feedback when a message has been starred or unstarred (#13860) [FIX] admin can sort users by email in directory view (#15796) [FIX] Pinned messages wouldn't collapse (#16188) [IMPROVE] Added border to page header. (#16792) [FIX] Correct thread messages display in context bar. (#16835) [FIX] Public channel cannot be acessed via URL when 'Allow Anonymous Read' is active (#16914) Fixed Line break incorrectly being called apostrophe (#16918) [IMPROVE] Context menu autofocus (#16915) Improve room types usage (#16753) [NEW] API `users.deactivateIdle` for mass-disabling of idle users (#16849) [NEW] API to logout from other locations (#16193) [IMPROVE] Add option to require authentication on user's shield endpoint (#16845) [FIX] Custom OAuth Bug (#16811) [FIX] Integrations page pagination (#16838) reset package-lock to upstream Apply suggestions from code review ...
users.logoutOtherClient to logout from other locations
Closes #16168
Like discussed with @geekgonecrazy, this PR adds a new API route
/users.logoutOtherClientsso that this functionality which already exists in the UI (user profile) is available for automation as well.