Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API to return 'source_id' for users #29718

Merged
merged 35 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
33868a1
Update API to return 'source_id' for users
tobiasbp Mar 11, 2024
1f8d825
Add field source_id in User object in swagger doc
tobiasbp Mar 12, 2024
bcd61c5
Fix: Add new line at end of swagger tamplete
tobiasbp Mar 12, 2024
fd21c60
Merge branch 'main' into main
GiteaBot Mar 14, 2024
580a872
Merge branch 'main' into main
GiteaBot Mar 14, 2024
1c48b25
Merge branch 'main' into main
GiteaBot Mar 14, 2024
3a1f771
Merge branch 'main' into main
GiteaBot Mar 14, 2024
aaa0088
Merge branch 'main' into main
GiteaBot Mar 14, 2024
21ab3d6
Merge branch 'main' into main
GiteaBot Mar 14, 2024
2c26550
Merge branch 'main' into main
GiteaBot Mar 14, 2024
2f68f37
Merge branch 'main' into main
GiteaBot Mar 14, 2024
688fb41
Merge branch 'main' into main
GiteaBot Mar 14, 2024
9a7c69b
Merge branch 'main' into main
GiteaBot Mar 14, 2024
3d8368f
Merge branch 'main' into main
GiteaBot Mar 15, 2024
5e863ca
Merge branch 'main' into main
GiteaBot Mar 15, 2024
1e2b6fa
Merge branch 'main' into main
GiteaBot Mar 15, 2024
789a5ea
Merge branch 'main' into main
GiteaBot Mar 15, 2024
42ef9d9
Merge branch 'main' into main
GiteaBot Mar 15, 2024
3b0640a
Merge branch 'main' into main
GiteaBot Mar 15, 2024
8ed0c8c
Merge branch 'main' into main
GiteaBot Mar 15, 2024
17df253
Merge branch 'main' into main
GiteaBot Mar 15, 2024
cbdaedc
Merge branch 'main' into main
GiteaBot Mar 15, 2024
1cf46f5
Merge branch 'main' into main
GiteaBot Mar 15, 2024
0bc8741
Merge branch 'main' into main
GiteaBot Mar 15, 2024
7feaf90
Merge branch 'main' into main
GiteaBot Mar 15, 2024
e49309f
Merge branch 'main' into main
GiteaBot Mar 15, 2024
4a64cb0
Merge branch 'main' into main
GiteaBot Mar 15, 2024
30bd8e8
Merge branch 'main' into main
GiteaBot Mar 15, 2024
c8fef4e
Merge branch 'main' into main
GiteaBot Mar 15, 2024
4dc7b9b
Merge branch 'main' into main
GiteaBot Mar 16, 2024
5216112
Merge branch 'main' into main
GiteaBot Apr 15, 2024
2c29bf7
Merge branch 'main' into main
GiteaBot Apr 16, 2024
b121dae
Merge branch 'main' into main
GiteaBot Apr 16, 2024
96d3986
Merge branch 'main' into main
GiteaBot Apr 16, 2024
927fff0
Merge branch 'main' into main
GiteaBot Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/structs/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ type User struct {
// the user's authentication sign-in name.
// default: empty
LoginName string `json:"login_name"`
// The ID of the user's Authentication Source
SourceID int64 `json:"source_id"`
// the user's full name
FullName string `json:"full_name"`
// swagger:strfmt email
Expand Down
1 change: 1 addition & 0 deletions services/convert/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func toUser(ctx context.Context, user *user_model.User, signed, authed bool) *ap
if authed {
result.IsAdmin = user.IsAdmin
result.LoginName = user.LoginName
result.SourceID = user.LoginSource
wxiaoguang marked this conversation as resolved.
Show resolved Hide resolved
result.LastLogin = user.LastLoginUnix.AsTime()
result.Language = user.Language
result.IsActive = user.IsActive
Expand Down
6 changes: 6 additions & 0 deletions templates/swagger/v1_json.tmpl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.