Commit 43d13a5f authored by Rémy Coutable's avatar Rémy Coutable

Introduce a new EE::Admin::GroupsController module

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ad2d9189
class Admin::GroupsController < Admin::ApplicationController
prepend EE::Admin::GroupsController
before_action :group, only: [:edit, :update, :destroy, :project_update, :members_update]
def index
......@@ -68,10 +70,10 @@ class Admin::GroupsController < Admin::ApplicationController
end
def group_params
params.require(:group).permit(group_params_ce << group_params_ee)
params.require(:group).permit(allowed_group_params)
end
def group_params_ce
def allowed_group_params
[
:avatar,
:description,
......@@ -84,12 +86,4 @@ class Admin::GroupsController < Admin::ApplicationController
:two_factor_grace_period
]
end
def group_params_ee
[
:repository_size_limit,
:shared_runners_minutes_limit,
:plan_id
]
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