diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-25 17:26:00 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-25 17:26:00 +0200 |
commit | 639b0a8715074a166eb9ef4252e4f2b5ae5e2c84 (patch) | |
tree | 8f8c93d3f02eecfe775d0ee48f245355a5da4b32 | |
parent | 5f3df89c64f9b93ce9b8f6a791c6d6d51fd18624 (diff) | |
download | gitlab-ce-639b0a8715074a166eb9ef4252e4f2b5ae5e2c84.tar.gz |
refactor add to team
-rw-r--r-- | lib/gitlab/user_team_manager.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab/user_team_manager.rb b/lib/gitlab/user_team_manager.rb index 82bb5a05879..a8ff4a3d94d 100644 --- a/lib/gitlab/user_team_manager.rb +++ b/lib/gitlab/user_team_manager.rb @@ -82,9 +82,7 @@ module Gitlab project_team_user.destroy if project_team_user.present? # project_team_user.project_access != granted_access - if granted_access > 0 - UsersProject.add_users_into_projects([project.id], [user.id], granted_access) - end + project.team << [user, granted_access] if granted_access > 0 end def max_teams_member_permission_in_project(user, project, teams = nil) |