diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-02 23:34:10 -0700 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-02 23:34:10 -0700 |
| commit | 0447c731ba392641145ac53cb8c50fab5392cda7 (patch) | |
| tree | e182c52ae09bed80bf0526dee9fb223e19076580 /lib | |
| parent | c228098587c1e90ec0530ae4646381448e36e573 (diff) | |
| parent | 41f88f468af711ee6b296754964de0c026dbd24c (diff) | |
| download | gitlab-ce-0447c731ba392641145ac53cb8c50fab5392cda7.tar.gz | |
Merge pull request #4161 from Undev/fix-#4109
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..d5ec4ff6676 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 if project.users_projects.with_user(user).any? end if teams.any? |
