Skip to content

Feature/#140 disabled user message#142

Merged
mrsimpson merged 2 commits intodevelopfrom
feature/#140-disabled-user-message
Nov 10, 2017
Merged

Feature/#140 disabled user message#142
mrsimpson merged 2 commits intodevelopfrom
feature/#140-disabled-user-message

Conversation

@mrsimpson
Copy link
Copy Markdown
Member

@mrsimpson mrsimpson commented Nov 9, 2017

Fixes #140

@ruKurz Before this fix, the information about being disabled was intentionally hidden from the user.
I guess this could have been done intentionally so that blocked users don't know they are blocked.

Now, this information is propagated and presented to the user.
As you can see, the fix is minor. There is no semantical difference in the accounts validation callback whether false is returned or an exception is thrown:

/**
     * Validate login attempts.
     *
     * @locus Server
     *
     * @param {function} func - <p>Called whenever a login is attempted (either successful or unsuccessful).  A login can be aborted by returning a falsy value or throwing an exception.</p>
     */
    function validateLoginAttempt(func:Function):any;

In addition to propagating this information on login, I also threw the same error once a disabled user tries to reset his password.

@ghost ghost assigned mrsimpson Nov 9, 2017
@ghost ghost added the progress:working label Nov 9, 2017
@mrsimpson mrsimpson requested a review from ruKurz November 9, 2017 11:54
@mrsimpson
Copy link
Copy Markdown
Member Author

@ruKurz please squash and merge if appropriate

Copy link
Copy Markdown
Member Author

@mrsimpson mrsimpson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packages/rocketchat-google-vision/.npm/package/npm-shrinkwrap.json changes is an artifact which keeps on changing on each build. Accidentally added it (should actually be part of the .gitignore), but it does no harm

Copy link
Copy Markdown

@ThomasRoehl ThomasRoehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested:

  • deactivating a user
  • logging in with a deactivated user
  • reset password from deactivated user
  • reactivating user
  • logging in with reactivated user
  • reset password of reactivated user
  • tested with the same with user as admin

Everything is working like expected.
The code is understandable and correctly formatted.

@mrsimpson mrsimpson merged commit b9fa8bb into develop Nov 10, 2017
@mrsimpson mrsimpson deleted the feature/#140-disabled-user-message branch November 10, 2017 16:44
@ghost ghost removed the progress:working label Nov 10, 2017
vickyokrm pushed a commit that referenced this pull request Feb 14, 2018
@ghost ghost assigned vickyokrm Feb 14, 2018
ThomasRoehl pushed a commit that referenced this pull request Feb 23, 2018
…stify/Rocket.Chat into feature/#142-ask-question-from-room
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User deactivated: no meaningful error message

3 participants