diff options
Diffstat (limited to 'app/models/members/project_member.rb')
-rw-r--r-- | app/models/members/project_member.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb index b86b536005b..d5666de79cc 100644 --- a/app/models/members/project_member.rb +++ b/app/models/members/project_member.rb @@ -33,7 +33,7 @@ class ProjectMember < Member # :master # ) # - def add_users_into_projects(project_ids, user_ids, access, current_user = nil, expires_at = nil) + def add_users_into_projects(project_ids, user_ids, access, current_user: nil, expires_at: nil) access_level = if roles_hash.has_key?(access) roles_hash[access] elsif roles_hash.values.include?(access.to_i) @@ -49,7 +49,13 @@ class ProjectMember < Member project = Project.find(project_id) users.each do |user| - Member.add_user(project.project_members, user, access_level, current_user, expires_at) + Member.add_user( + project.project_members, + user, + access_level, + current_user: current_user, + expires_at: expires_at + ) end end end |