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
Tatuya Kamada
gitlab-ce
Commits
6548e9b4
Commit
6548e9b4
authored
Jun 23, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 2FA status to user admin API
Closes
https://github.com/gitlabhq/gitlabhq/issues/9391
parent
764b5913
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
CHANGELOG
CHANGELOG
+1
-0
doc/api/users.md
doc/api/users.md
+4
-2
lib/api/entities.rb
lib/api/entities.rb
+1
-0
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+1
-0
No files found.
CHANGELOG
View file @
6548e9b4
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 7.13.0 (unreleased)
v 7.13.0 (unreleased)
- Add `two_factor_enabled` field to admin user API (Stan Hu)
- Fix invalid timestamps in RSS feeds (Rowan Wookey)
- Fix invalid timestamps in RSS feeds (Rowan Wookey)
- Fix error when deleting a user who has projects (Stan Hu)
- Fix error when deleting a user who has projects (Stan Hu)
- Fix downloading of patches on public merge requests when user logged out (Stan Hu)
- Fix downloading of patches on public merge requests when user logged out (Stan Hu)
...
...
doc/api/users.md
View file @
6548e9b4
...
@@ -58,7 +58,8 @@ GET /users
...
@@ -58,7 +58,8 @@ GET /users
"is_admin"
:
false
,
"is_admin"
:
false
,
"avatar_url"
:
"http://localhost:3000/uploads/user/avatar/1/cd8.jpeg"
,
"avatar_url"
:
"http://localhost:3000/uploads/user/avatar/1/cd8.jpeg"
,
"can_create_group"
:
true
,
"can_create_group"
:
true
,
"current_sign_in_at"
:
"2014-03-19T13:12:15Z"
"current_sign_in_at"
:
"2014-03-19T13:12:15Z"
,
"two_factor_enabled"
:
true
},
},
{
{
"id"
:
2
,
"id"
:
2
,
...
@@ -81,7 +82,8 @@ GET /users
...
@@ -81,7 +82,8 @@ GET /users
"can_create_group"
:
true
,
"can_create_group"
:
true
,
"can_create_project"
:
true
,
"can_create_project"
:
true
,
"projects_limit"
:
100
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2014-03-19T17:54:13Z"
"current_sign_in_at"
:
"2014-03-19T17:54:13Z"
,
"two_factor_enabled"
:
false
}
}
]
]
```
```
...
...
lib/api/entities.rb
View file @
6548e9b4
...
@@ -24,6 +24,7 @@ module API
...
@@ -24,6 +24,7 @@ module API
expose
:identities
,
using:
Entities
::
Identity
expose
:identities
,
using:
Entities
::
Identity
expose
:can_create_group?
,
as: :can_create_group
expose
:can_create_group?
,
as: :can_create_group
expose
:can_create_project?
,
as: :can_create_project
expose
:can_create_project?
,
as: :can_create_project
expose
:two_factor_enabled
end
end
class
UserLogin
<
UserFull
class
UserLogin
<
UserFull
...
...
spec/requests/api/users_spec.rb
View file @
6548e9b4
...
@@ -35,6 +35,7 @@ describe API::API, api: true do
...
@@ -35,6 +35,7 @@ describe API::API, api: true do
expect
(
json_response
.
first
.
keys
).
to
include
'email'
expect
(
json_response
.
first
.
keys
).
to
include
'email'
expect
(
json_response
.
first
.
keys
).
to
include
'identities'
expect
(
json_response
.
first
.
keys
).
to
include
'identities'
expect
(
json_response
.
first
.
keys
).
to
include
'can_create_project'
expect
(
json_response
.
first
.
keys
).
to
include
'can_create_project'
expect
(
json_response
.
first
.
keys
).
to
include
'two_factor_enabled'
end
end
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