Merge branch '5941-extract-ee-controllers' into 'master'

Backport of "Extract EE specific files/lines for app/controllers/groups"

See merge request gitlab-org/gitlab-ce!19343
This commit is contained in:
Rémy Coutable 2018-06-06 05:57:55 +00:00
commit 4ccf4d3394
2 changed files with 9 additions and 2 deletions

View file

@ -3,8 +3,12 @@ class Groups::GroupMembersController < Groups::ApplicationController
include MembersPresentation
include SortingHelper
def self.admin_not_required_endpoints
%i[index leave request_access]
end
# Authorize
before_action :authorize_admin_group_member!, except: [:index, :leave, :request_access]
before_action :authorize_admin_group_member!, except: admin_not_required_endpoints
skip_cross_project_access_check :index, :create, :update, :destroy, :request_access,
:approve_access_request, :leave, :resend_invite,

View file

@ -76,12 +76,15 @@ class Groups::MilestonesController < Groups::ApplicationController
def milestones
milestones = MilestonesFinder.new(search_params).execute
legacy_milestones = GroupMilestone.build_collection(group, group_projects, params)
@sort = params[:sort] || 'due_date_asc'
MilestoneArray.sort(milestones + legacy_milestones, @sort)
end
def legacy_milestones
GroupMilestone.build_collection(group, group_projects, params)
end
def milestone
@milestone =
if params[:title]