Commit 455ffc96 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

Introduce a new EE::Admin::UsersController module

See merge request gitlab-org/gitlab-ee!3319
parents 5ae3f375 f8dc3c5d
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