summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrey Kumanyaev <me@zzet.org>2013-06-01 19:40:20 +0400
committerAndrey Kumanyaev <me@zzet.org>2013-06-01 19:40:20 +0400
commit41f88f468af711ee6b296754964de0c026dbd24c (patch)
tree2a8c0a9786532f3c6d5345bc244304266be4bf45 /lib
parent08c2c94d46f78f68f09dcc43b8249570a64caffe (diff)
downloadgitlab-ce-41f88f468af711ee6b296754964de0c026dbd24c.tar.gz
No check access if no relation between user and project
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/user_team_manager.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/user_team_manager.rb b/lib/gitlab/user_team_manager.rb
index 6f611b25fbf..d5ec4ff6676 100644
--- a/lib/gitlab/user_team_manager.rb
+++ b/lib/gitlab/user_team_manager.rb
@@ -100,7 +100,7 @@ module Gitlab
teams ||= project.user_teams.with_member(user)
if action && (action == :added)
- result_access = project.users_projects.with_user(user).first.project_access
+ result_access = project.users_projects.with_user(user).first.project_access if project.users_projects.with_user(user).any?
end
if teams.any?