Commit f8dc3c5d authored by Rémy Coutable's avatar Rémy Coutable

Introduce a new EE::Admin::UsersController module

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ad2d9189
class Admin::UsersController < Admin::ApplicationController
prepend EE::Admin::UsersController
before_action :user, except: [:index, :new, :create]
def index
......@@ -187,10 +189,10 @@ class Admin::UsersController < Admin::ApplicationController
end
def user_params
params.require(:user).permit(user_params_ce << user_params_ee)
params.require(:user).permit(allowed_user_params)
end
def user_params_ce
def allowed_user_params
[
:access_level,
:avatar,
......@@ -218,13 +220,6 @@ class Admin::UsersController < Admin::ApplicationController
]
end
def user_params_ee
[
:note,
namespace_attributes: [:id, :shared_runners_minutes_limit, :plan_id]
]
end
def update_user(&block)
result = Users::UpdateService.new(current_user, user: user).execute(&block)
......
module EE
module Admin
module UsersController
private
def allowed_user_params
super + [
:note,
namespace_attributes: [:id, :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