プロジェクト

全般

プロフィール

Vote #81134

完了

Include two-factor authentication scheme in users API response

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
REST API_32
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
32
version_id:
152
issue_org_id:
34242
author_id:
332
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

By #1237, a new column "twofa_scheme" that represents the two-factor authentication scheme enabled for the user. You can also know whether two-factor auth is enabled for the user by checking the column's value.

I think Users API should export the new column as well.


diff --git a/app/views/users/show.api.rsb b/app/views/users/show.api.rsb
index 3bc77e3be..5fe3d5b1c 100644
--- a/app/views/users/show.api.rsb
+++ b/app/views/users/show.api.rsb
@@ -9,6 +9,7 @@ api.user do
   api.updated_on @user.updated_on
   api.last_login_on     @user.last_login_on
   api.passwd_changed_on @user.passwd_changed_on
+  api.twofa_scheme      @user.twofa_scheme
   api.api_key    @user.api_key if User.current.admin? || (User.current == @user)
   api.status     @user.status if User.current.admin?

Possible values:

  • null: Two-factor authentication is disabled
  • "totp": Two-factor authentication with TOTP is enabled

journals

--------------------------------------------------------------------------------
I attach the patch.
--------------------------------------------------------------------------------
LGTM. Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
Committed the patch. Thank you for your contribution.
--------------------------------------------------------------------------------

Admin Redmine さんが4年以上前に更新

  • カテゴリREST API_32 にセット
  • 対象バージョン4.2.0_152 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0