Commit 9a7fc97b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'rc/introduce-a-new-ee-admin-groups_controllers-module' into 'master'

Introduce a new EE::Admin::GroupsController module

See merge request gitlab-org/gitlab-ee!3320
parents 45aef202 43d13a5f
class Admin::GroupsController < Admin::ApplicationController class Admin::GroupsController < Admin::ApplicationController
prepend EE::Admin::GroupsController
before_action :group, only: [:edit, :update, :destroy, :project_update, :members_update] before_action :group, only: [:edit, :update, :destroy, :project_update, :members_update]
def index def index
...@@ -68,10 +70,10 @@ class Admin::GroupsController < Admin::ApplicationController ...@@ -68,10 +70,10 @@ class Admin::GroupsController < Admin::ApplicationController
end end
def group_params def group_params
params.require(:group).permit(group_params_ce << group_params_ee) params.require(:group).permit(allowed_group_params)
end end
def group_params_ce def allowed_group_params
[ [
:avatar, :avatar,
:description, :description,
...@@ -84,12 +86,4 @@ class Admin::GroupsController < Admin::ApplicationController ...@@ -84,12 +86,4 @@ class Admin::GroupsController < Admin::ApplicationController
:two_factor_grace_period :two_factor_grace_period
] ]
end end
def group_params_ee
[
:repository_size_limit,
:shared_runners_minutes_limit,
:plan_id
]
end
end end
module EE
module Admin
module GroupsController
private
def allowed_group_params
super + [
:repository_size_limit,
:shared_runners_minutes_limit,
:plan_id
]
end
end
end
end
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