Get fields loginName & SourceID for users (#654)
This _PR_ adds the following fields to the _User_ struct: - _LoginName_: Currently returned by the Gitea API. - _SourceID_: [Scheduled to be returned by the Gitea API as of version 1.22.0](https://github.com/go-gitea/gitea/pull/29718). The fields are used for users with non-local Authentication Sources (LDAP, oAuth etc.). Co-authored-by: tobias.petersen <tobias.petersen@unity3d.com> Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/654 Reviewed-by: appleboy <appleboy.tw@gmail.com> Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com> Co-authored-by: tobiasbp <tobiasbp@noreply.gitea.com> Co-committed-by: tobiasbp <tobiasbp@noreply.gitea.com>
This commit is contained in:
parent
f12d597965
commit
e21c012dcb
1 changed files with 4 additions and 0 deletions
|
@ -21,6 +21,10 @@ type User struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
// the user's username
|
// the user's username
|
||||||
UserName string `json:"login"`
|
UserName string `json:"login"`
|
||||||
|
// The login_name of non local users (e.g. LDAP / OAuth / SMTP)
|
||||||
|
LoginName string `json:"login_name"`
|
||||||
|
// The ID of the Authentication Source for non local users.
|
||||||
|
SourceID int64 `json:"source_id"`
|
||||||
// the user's full name
|
// the user's full name
|
||||||
FullName string `json:"full_name"`
|
FullName string `json:"full_name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
|
|
Loading…
Reference in a new issue