Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
141b8b67
Commit
141b8b67
authored
Dec 28, 2015
by
Michi302
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make single user API endpoint return Entities::User instead of Entities::UserBasic
parent
540eb0a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
doc/api/users.md
doc/api/users.md
+7
-0
lib/api/users.rb
lib/api/users.rb
+1
-1
No files found.
doc/api/users.md
View file @
141b8b67
...
@@ -123,6 +123,13 @@ Parameters:
...
@@ -123,6 +123,13 @@ Parameters:
"name"
:
"John Smith"
,
"name"
:
"John Smith"
,
"state"
:
"active"
,
"state"
:
"active"
,
"avatar_url"
:
"http://localhost:3000/uploads/user/avatar/1/cd8.jpeg"
,
"avatar_url"
:
"http://localhost:3000/uploads/user/avatar/1/cd8.jpeg"
,
"created_at"
:
"2012-05-23T08:00:58Z"
,
"is_admin"
:
false
,
"bio"
:
null
,
"skype"
:
""
,
"linkedin"
:
""
,
"twitter"
:
""
,
"website_url"
:
""
}
}
```
```
...
...
lib/api/users.rb
View file @
141b8b67
...
@@ -39,7 +39,7 @@ module API
...
@@ -39,7 +39,7 @@ module API
if
current_user
.
is_admin?
if
current_user
.
is_admin?
present
@user
,
with:
Entities
::
UserFull
present
@user
,
with:
Entities
::
UserFull
else
else
present
@user
,
with:
Entities
::
User
Basic
present
@user
,
with:
Entities
::
User
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment