-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only the user themselves can regenerate their token
- Loading branch information
Showing
2 changed files
with
30 additions
and
21 deletions.
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 |
---|---|---|
|
@@ -16,18 +16,19 @@ | |
span.input-group-text @ | ||
input#email.form-control placeholder="[email protected]" readonly="" type="email" value="#{@user.email}" | ||
|
||
form.needs-validation novalidate="" | ||
.form-row.mb-3 | ||
.col | ||
b Your Access Token | ||
.col | ||
- if flash[:token] | ||
.alert.alert-warning role="alert" | ||
| Important! please make note of this token, you will see it only this once. | ||
pre | ||
= flash[:token] | ||
- else | ||
= link_to 'Regenerate Token', regenerate_token_user_path(@user), :data => {:confirm => 'Are you sure?'} | ||
- if (current_user.admin? or (current_user.id == @user.id)) | ||
form.needs-validation novalidate="" | ||
.form-row.mb-3 | ||
.col | ||
b Your Access Token | ||
.col | ||
- if flash[:token] | ||
.alert.alert-warning role="alert" | ||
| Important! please make note of this token, you will see it only this once. | ||
pre | ||
= flash[:token] | ||
- else | ||
= link_to 'Regenerate Token', regenerate_token_user_path(@user), :data => {:confirm => 'Are you sure?'} | ||
|
||
- if current_user.admin? | ||
.card | ||
|