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:
commit
4ccf4d3394
2 changed files with 9 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue