Commit 639b0a8715074a166eb9ef4252e4f2b5ae5e2c84

Authored by Dmitriy Zaporozhets
1 parent 5f3df89c

refactor add to team

Showing 1 changed file with 1 additions and 3 deletions   Show diff stats
lib/gitlab/user_team_manager.rb
@@ -82,9 +82,7 @@ module Gitlab @@ -82,9 +82,7 @@ module Gitlab
82 project_team_user.destroy if project_team_user.present? 82 project_team_user.destroy if project_team_user.present?
83 83
84 # project_team_user.project_access != granted_access 84 # project_team_user.project_access != granted_access
85 - if granted_access > 0  
86 - UsersProject.add_users_into_projects([project.id], [user.id], granted_access)  
87 - end 85 + project.team << [user, granted_access] if granted_access > 0
88 end 86 end
89 87
90 def max_teams_member_permission_in_project(user, project, teams = nil) 88 def max_teams_member_permission_in_project(user, project, teams = nil)