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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
80682f95
Commit
80682f95
authored
Oct 15, 2020
by
Rajendra Kadam
Committed by
Sean McGivern
Oct 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose `created_at` in group and project member response
parent
626397fd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
0 deletions
+8
-0
changelogs/unreleased/expose-created-at.yml
changelogs/unreleased/expose-created-at.yml
+5
-0
doc/api/members.md
doc/api/members.md
+1
-0
lib/api/entities/member.rb
lib/api/entities/member.rb
+1
-0
spec/requests/api/members_spec.rb
spec/requests/api/members_spec.rb
+1
-0
No files found.
changelogs/unreleased/expose-created-at.yml
0 → 100644
View file @
80682f95
---
title
:
Expose `created_at` in Group and Project members API response
merge_request
:
45156
author
:
Rajendra Kadam
type
:
added
doc/api/members.md
View file @
80682f95
...
...
@@ -180,6 +180,7 @@ Example response:
"web_url"
:
"http://192.168.1.8:3000/root"
,
"access_level"
:
30
,
"email"
:
"john@example.com"
,
"created_at"
:
"2012-10-22T14:13:35Z"
,
"expires_at"
:
null
,
"group_saml_identity"
:
null
}
...
...
lib/api/entities/member.rb
View file @
80682f95
...
...
@@ -5,6 +5,7 @@ module API
class
Member
<
Grape
::
Entity
expose
:user
,
merge:
true
,
using:
UserBasic
expose
:access_level
expose
:created_at
expose
:expires_at
end
end
...
...
spec/requests/api/members_spec.rb
View file @
80682f95
...
...
@@ -196,6 +196,7 @@ RSpec.describe API::Members do
# Member attributes
expect
(
json_response
[
'access_level'
]).
to
eq
(
Member
::
DEVELOPER
)
expect
(
json_response
[
'created_at'
].
to_time
).
to
be_like_time
(
developer
.
created_at
)
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