Commit 4ccf4d33 authored by Rémy Coutable's avatar Rémy Coutable

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
parents 414af121 fd97b86e
......@@ -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,
......
......@@ -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]
......
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