プロジェクト

全般

プロフィール

Vote #77625

未完了

Get which auth_source_id of a user

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

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
REST API_32
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
32
version_id:
32
issue_org_id:
23307
author_id:
23186
assigned_to_id:
0
comments:
8
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

it would've been nice to be able to get which auth_source_id a given user has through the REST API. A nice complement to when creating user where it is possible to set the auth_source_id.


journals

--------------------------------------------------------------------------------
I agree. This feature is also useful for admin scripts which needs to distinguish between "external" and LDAP users.

I attached a patch for this feature. auth_source_id only gets visible for admin users in it, as I do not see the need for standard users.
--------------------------------------------------------------------------------
@Toshi MARUYAMA : Do you have an opinion on this issue?
--------------------------------------------------------------------------------
What is the status of this issue?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I think the response should include not only id but also name. Maybe the response does not include "auth_source" if the user uses internal authentication.

<pre><code class="json">
{
"user": {
"id": 1,
"login": "admin",
"firstname": "Redmine",
"lastname": "Admin",
"created_on": "2006-07-19T17:12:21Z",
"last_login_on": "2019-09-06T06:37:53Z",
"auth_source": {
"id": 1,
"name": "LDAP test server"
}
}
}
</code></pre>
--------------------------------------------------------------------------------
Here is a patch to add auth_source to the response of @GET /users/:id.(xml|json)@. auth_source is included only when the users auth_source is not nil and the current user is an administrator.

<pre>
"auth_source": {
"id": 1,
"name": "LDAP test server"
},
</pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,23306,Support for authentication sources in REST API
relates,New,36659,Add "auth_source_id" to GET request for Endpoint /users.:format

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

  • カテゴリREST API_32 にセット
  • 対象バージョンCandidate for next major release_32 にセット

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

いいね!0
いいね!0