From 08c2c94d46f78f68f09dcc43b8249570a64caffe Mon Sep 17 00:00:00 2001 From: Andrey Kumanyaev Date: Sat, 1 Jun 2013 19:24:15 +0400 Subject: Fix bug with team assignation on project from #4109 --- lib/gitlab/user_team_manager.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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? -- cgit v1.2.1