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
Boxiang Sun
gitlab-ce
Commits
51b41633
Commit
51b41633
authored
Dec 20, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport a change made in EE
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
b6236823
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lib/api/members.rb
lib/api/members.rb
+3
-1
No files found.
lib/api/members.rb
View file @
51b41633
...
...
@@ -59,7 +59,9 @@ module API
member
=
source
.
add_user
(
params
[
:user_id
],
params
[
:access_level
],
current_user:
current_user
,
expires_at:
params
[
:expires_at
])
if
member
.
persisted?
&&
member
.
valid?
if
!
member
not_allowed!
# This currently can only be reached in EE
elsif
member
.
persisted?
&&
member
.
valid?
present
member
.
user
,
with:
Entities
::
Member
,
member:
member
else
render_validation_error!
(
member
)
...
...
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