summaryrefslogtreecommitdiff
path: root/app/models/member.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-03 11:06:52 +0200
committerRémy Coutable <remy@rymai.me>2016-10-03 11:24:16 +0200
commitde61ebc8fcae9fbcd59ffdbd12ac91adc67079d3 (patch)
tree0dd193efdfaf209492d0d0caf54ef3b0c8c074db /app/models/member.rb
parent7134599860651cc0f502581c97853a26f2fb4471 (diff)
downloadgitlab-ce-de61ebc8fcae9fbcd59ffdbd12ac91adc67079d3.tar.gz
Make Member#add_user set access_level for requestersbackport-part-of-ee-744
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/member.rb')
-rw-r--r--app/models/member.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/member.rb b/app/models/member.rb
index 38a278ea559..b89ba8ecbb8 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -103,7 +103,12 @@ class Member < ActiveRecord::Base
}
if member.request?
- ::Members::ApproveAccessRequestService.new(source, current_user, id: member.id).execute
+ ::Members::ApproveAccessRequestService.new(
+ source,
+ current_user,
+ id: member.id,
+ access_level: access_level
+ ).execute
else
member.save
end