Commit 41f88f468af711ee6b296754964de0c026dbd24c
1 parent
08c2c94d
Exists in
master
and in
4 other branches
No check access if no relation between user and project
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/gitlab/user_team_manager.rb
| ... | ... | @@ -100,7 +100,7 @@ module Gitlab |
| 100 | 100 | teams ||= project.user_teams.with_member(user) |
| 101 | 101 | |
| 102 | 102 | if action && (action == :added) |
| 103 | - result_access = project.users_projects.with_user(user).first.project_access | |
| 103 | + result_access = project.users_projects.with_user(user).first.project_access if project.users_projects.with_user(user).any? | |
| 104 | 104 | end |
| 105 | 105 | |
| 106 | 106 | if teams.any? | ... | ... |