Read about our upcoming Code of Conduct on this issue

Commit 463211dd authored by Sean McGivern's avatar Sean McGivern
Browse files

Remove confidential access checks if user has group access

We simplify the query generated if the user can see all confidential issues in a
project context. This change applies the same simplification to group issue
lists.
parent d18e0c179ee9
......@@ -120,9 +120,13 @@ def user_can_see_all_confidential_issues?
return @user_can_see_all_confidential_issues = true if current_user.full_private_access?
@user_can_see_all_confidential_issues =
project? &&
project &&
project.team.max_member_access(current_user.id) >= CONFIDENTIAL_ACCESS_LEVEL
if project? && project
project.team.max_member_access(current_user.id) >= CONFIDENTIAL_ACCESS_LEVEL
elsif group
group.max_member_access_for_user(current_user) >= CONFIDENTIAL_ACCESS_LEVEL
else
false
end
end
def user_cannot_see_confidential_issues?
......
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