#5898 メンバー登録画面にて2段階認証が有効になっているメンバーの2段階認証をリセットするチェックボックスを追加 #6546
+27
−0
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.
概要(Overview・Refs Issue)
fixes #5898
現在2段階認証はオフにしても新しい認証が設定できるわけではなく、再度有効にしても同じ認証コードのキーが必要になります。
現時点では、ログインした後に再設定することはできますが、ログイン前ではできないため、認証コードを登録したデバイスを紛失したなどの場合においては、データベースを触らない限り再設定ができない状態になっています。
このPRは、メンバーの編集画面にて、2要素認証のキーをリセットすることができるようになります。また、 Issue にコメントしたように、既存の認証キーは有効のまま、一時的に2段階認証を無効化したいというユースケースも考えられるため、今までの無効化の挙動はそのままにしています。
方針(Policy)
メンバーの編集画面に、2段階認証をリセットするチェックボックスを作成しました。
チェックを入れて保存した場合、対象のユーザーの2段階認証キーをnullに設定して、再登録できるようになります。
メンバーの編集が可能な権限を持つ人にリセットを依頼することで、デバイスを紛失したなどの場合でも2段階認証の再設定が可能になります。
実装に関する補足(Appendix)
2段階認証が有効の場合の時のみ、チェックボックスが出現するようになっています。
テスト(Test)
確認した挙動など:
相談(Discussion)
初のContributionになるので、こうした方がよいというところがありましたら教えていただけると幸いです!
マイナーバージョン互換性保持のための制限事項チェックリスト
レビュワー確認項目