Refactor authorized params in Admin::GroupsController
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
dafd5531ed
commit
83c1395af2
1 changed files with 6 additions and 2 deletions
|
@ -61,7 +61,11 @@ class Admin::GroupsController < Admin::ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def group_params
|
def group_params
|
||||||
params.require(:group).permit(
|
params.require(:group).permit(group_params_ce)
|
||||||
|
end
|
||||||
|
|
||||||
|
def group_params_ce
|
||||||
|
[
|
||||||
:avatar,
|
:avatar,
|
||||||
:description,
|
:description,
|
||||||
:lfs_enabled,
|
:lfs_enabled,
|
||||||
|
@ -69,6 +73,6 @@ class Admin::GroupsController < Admin::ApplicationController
|
||||||
:path,
|
:path,
|
||||||
:request_access_enabled,
|
:request_access_enabled,
|
||||||
:visibility_level
|
:visibility_level
|
||||||
)
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue