diff options
author | Andrey Kumanyaev <me@zzet.org> | 2013-06-01 19:24:15 +0400 |
---|---|---|
committer | Andrey Kumanyaev <me@zzet.org> | 2013-06-01 19:24:15 +0400 |
commit | 08c2c94d46f78f68f09dcc43b8249570a64caffe (patch) | |
tree | 21faf872c1a1975a7b17d17f170b61a15a33ec8a /lib | |
parent | ee2124b7e935bb8bbe7a33c1a276efa296311b28 (diff) | |
download | gitlab-ce-08c2c94d46f78f68f09dcc43b8249570a64caffe.tar.gz |
Fix bug with team assignation on project from #4109
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/user_team_manager.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/user_team_manager.rb b/lib/gitlab/user_team_manager.rb index c9ca0f3c5bc..6f611b25fbf 100644 --- a/lib/gitlab/user_team_manager.rb +++ b/lib/gitlab/user_team_manager.rb @@ -99,8 +99,8 @@ module Gitlab teams ||= project.user_teams.with_member(user) - if action && (action == :added) && (teams.count == 1) - result_access ||= project.users_project.with_user(user).first.project_access + if action && (action == :added) + result_access = project.users_projects.with_user(user).first.project_access end if teams.any? |