-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Change: display user's password reset link to the admin when mail server disabled #1371
Merged
arikfr
merged 4 commits into
getredash:master
from
vitorbaptista:feature/show_admins_the_password_reset_link
Nov 20, 2016
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
72389b0
Display user's password reset link to the admin
vitorbaptista 69c1f15
Wrap "Password Reset Button" in form group to visually separate it
vitorbaptista 438ebb9
Fix condition to show forgotten password link and alter its message
vitorbaptista 3ca78be
Fix conditions to show the user reset link
vitorbaptista File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,21 @@ <h3 class="p-l-5">{{user.name}}</h3> | |
</p> | ||
<div ng-if="currentUser.isAdmin"> | ||
<hr/> | ||
<button class="btn btn-default" ng-click="sendPasswordReset()" ng-disabled="disablePasswordResetButton">Send | ||
Password Reset Email | ||
</button> | ||
<div class="form-group"> | ||
<button class="btn btn-default" ng-click="sendPasswordReset()" ng-disabled="disablePasswordResetButton">Send | ||
Password Reset Email | ||
</button> | ||
</div> | ||
|
||
<div ng-if="passwordResetLink && !disablePasswordResetButton" class="alert alert-success"> | ||
<p> | ||
<strong>The user should receive a link to reset his password by email soon.</strong> | ||
</p> | ||
<p ng-if="clientConfig.mailSettingsMissing"> | ||
You can use the following link to reset the password yourself:<br/> | ||
{{passwordResetLink}} | ||
</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
</div> | ||
</div> | ||
</div> | ||
<div ng-show="selectedTab == 'apiKey'" class="p-10"> | ||
|
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add here
ng-if="clientConfig.mailSettingsMissing"
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So then I should remove the
ng-if
from the "You don't have a mail server configured" and always show that message?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. We show one message if there is no mail server configured and the other otherwise. But I just noticed that you have the ng-if backwards: it should be
clientConfig.mailSettingsMissing
for your message and! clientConfig.mailSettingsMissing
for the original one.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. Just changed it. To be honest, as a user, I'd prefer to have the link shown regardless if I have an e-mail server configured or not, similar to the user invites. I find them useful even when the user will receive an e-mail, and it also gives admins the ability to change a user's password herself. Happy to go with whatever you think is best, though.
Just to let you know, I'm adding new commits and not changing the original ones just because I think it's easier to review this way, but I expect that you (or me) will squash them before merging.