Commit 41f88f46 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev

No check access if no relation between user and project

parent 08c2c94d
......@@ -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?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment