API: get list of users with additional auth info (#17305)
* batch disable users * batch revoke users tokens * split batch disable user and revoke token * API: get users with auth info and isExternal flag * fix tests for batch disable users * Users: refactor /api/users/search endpoint * Users: use alias for "user" table * Chore: add BatchDisableUsers() to the bus * Users: order user list by id explicitly * Users: return AuthModule from /api/users/:id endpoint * Users: do not return unused fields * Users: fix SearchUsers method after last changes * User: return auth module as array for future purposes * User: tests for SearchUsers() * User: return only latest auth module in SearchUsers() * User: fix JOIN, get only most recent auth module
This commit is contained in:
@@ -28,6 +28,11 @@ func getUserUserProfile(userID int64) Response {
|
||||
return Error(500, "Failed to get user", err)
|
||||
}
|
||||
|
||||
getAuthQuery := m.GetAuthInfoQuery{UserId: userID}
|
||||
if err := bus.Dispatch(&getAuthQuery); err == nil {
|
||||
query.Result.AuthModule = []string{getAuthQuery.Result.AuthModule}
|
||||
}
|
||||
|
||||
return JSON(200, query.Result)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user