-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a form to the Accounts Manager for resetting two factor authentic…
…ation for students. This form does not allow the user to reset their own two factor authentication secret, but that of other users at equal or lesser permission level to their own. Note that in the admin course if there are multiple admin users, then one admin user can reset two factor authentication for another. Also some clean up and issue fixes in the `htdocs/js/UserList/userlist.js` file with form validation. The "change" event handler was being added multiple times to the users list table. More clean up is needed though (with this and the other pages with action forms). There is a lot of redundancy with this form validation implementation.
- Loading branch information
Showing
5 changed files
with
114 additions
and
60 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
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
23 changes: 23 additions & 0 deletions
23
templates/ContentGenerator/Instructor/UserList/reset_2fa_form.html.ep
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div> | ||
<div class="d-inline-block alert alert-danger p-1 mb-2"> | ||
<em> | ||
<%= maketext('Warning: This will make users need to setup two factor authentication again! Only do this ' | ||
. 'for users that can no longer access the course due the account being lost in the authenticator app.') | ||
=%> | ||
</em> | ||
</div> | ||
<div class="row mb-2"> | ||
<%= label_for reset_2fa_select => maketext('Reset two factor authentication for selected users?'), | ||
class => 'col-form-label col-form-label-sm col-auto' =%> | ||
<div class="col-auto"> | ||
<%= select_field 'action.reset_2fa.confirm' => [ | ||
[ maketext('No') => 'no', selected => undef ], | ||
[ maketext('Yes') => 'yes' ] | ||
], | ||
id => 'reset_2fa_select', class => 'form-select form-select-sm' =%> | ||
</div> | ||
</div> | ||
<div id="reset_2fa_confirm_err_msg" class="alert alert-danger p-1 d-inline-flex d-none"> | ||
<%= maketext('Please confirm it is okay to reset two factor authentication for selected users.') %> | ||
</div> | ||
</div> |
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