Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f8dc3c5d
Commit
f8dc3c5d
authored
Oct 11, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce a new EE::Admin::UsersController module
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
ad2d9189
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+4
-9
ee/app/controllers/ee/admin/users_controller.rb
ee/app/controllers/ee/admin/users_controller.rb
+14
-0
No files found.
app/controllers/admin/users_controller.rb
View file @
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
)
...
...
ee/app/controllers/ee/admin/users_controller.rb
0 → 100644
View file @
f8dc3c5d
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment