Commit 01f7d1e3 authored by James Lopez's avatar James Lopez

Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/import-export-events

parents f85f5a45 d33991f8
...@@ -14,6 +14,7 @@ v 8.10.0 (unreleased) ...@@ -14,6 +14,7 @@ v 8.10.0 (unreleased)
- Exclude email check from the standard health check - Exclude email check from the standard health check
- Fix changing issue state columns in milestone view - Fix changing issue state columns in milestone view
- Fix user creation with stronger minimum password requirements !4054 (nathan-pmt) - Fix user creation with stronger minimum password requirements !4054 (nathan-pmt)
- PipelinesFinder uses git cache data
- Check for conflicts with existing Project's wiki path when creating a new project. - Check for conflicts with existing Project's wiki path when creating a new project.
- Remove unused front-end variable -> default_issues_tracker - Remove unused front-end variable -> default_issues_tracker
- Add API endpoint for a group issues !4520 (mahcsig) - Add API endpoint for a group issues !4520 (mahcsig)
...@@ -26,6 +27,7 @@ v 8.9.3 (unreleased) ...@@ -26,6 +27,7 @@ v 8.9.3 (unreleased)
- Update mobile button icons to be more inline with typical UI paradigms - Update mobile button icons to be more inline with typical UI paradigms
- Fixes missing avatar on system notes. !4954 - Fixes missing avatar on system notes. !4954
- Fixes issues importing events in Import/Export. Import/Export version bumped to 0.1.1 - Fixes issues importing events in Import/Export. Import/Export version bumped to 0.1.1
- Improve performance of obtaining the maximum access of a user in a project
v 8.9.2 v 8.9.2
- Fix visibility of snippets when searching. - Fix visibility of snippets when searching.
......
...@@ -29,10 +29,10 @@ class PipelinesFinder ...@@ -29,10 +29,10 @@ class PipelinesFinder
end end
def branches def branches
project.repository.branches.map(&:name) project.repository.branch_names
end end
def tags def tags
project.repository.tags.map(&:name) project.repository.tag_names
end end
end end
...@@ -32,6 +32,7 @@ class Member < ActiveRecord::Base ...@@ -32,6 +32,7 @@ class Member < ActiveRecord::Base
scope :request, -> { where.not(requested_at: nil) } scope :request, -> { where.not(requested_at: nil) }
scope :non_request, -> { where(requested_at: nil) } scope :non_request, -> { where(requested_at: nil) }
scope :non_pending, -> { non_request.non_invite } scope :non_pending, -> { non_request.non_invite }
scope :has_access, -> { where('access_level > 0') }
scope :guests, -> { where(access_level: GUEST) } scope :guests, -> { where(access_level: GUEST) }
scope :reporters, -> { where(access_level: REPORTER) } scope :reporters, -> { where(access_level: REPORTER) }
......
...@@ -137,20 +137,10 @@ class ProjectTeam ...@@ -137,20 +137,10 @@ class ProjectTeam
def max_member_access(user_id) def max_member_access(user_id)
access = [] access = []
project.members.non_request.each do |member| access += project.members.non_request.where(user_id: user_id).has_access.pluck(:access_level)
if member.user_id == user_id
access << member.access_field if member.access_field
break
end
end
if group if group
group.members.non_request.each do |member| access += group.members.non_request.where(user_id: user_id).has_access.pluck(:access_level)
if member.user_id == user_id
access << member.access_field if member.access_field
break
end
end
end end
if project.invited_groups.any? && project.allowed_to_share_with_group? if project.invited_groups.any? && project.allowed_to_share_with_group?
......
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