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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
731b2313
Commit
731b2313
authored
May 03, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log to application.log when an admin starts and stops impersonating a user
Closes gitlab-org/gitlab-ee#536
parent
1a9d5059
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
CHANGELOG
CHANGELOG
+1
-0
app/controllers/admin/impersonations_controller.rb
app/controllers/admin/impersonations_controller.rb
+2
-0
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+2
-0
No files found.
CHANGELOG
View file @
731b2313
...
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.8.0 (unreleased)
v 8.8.0 (unreleased)
- Project#open_branches has been cleaned up and no longer loads entire records into memory.
- Project#open_branches has been cleaned up and no longer loads entire records into memory.
- Log to application.log when an admin starts and stops impersonating a user
- Make build status canceled if any of the jobs was canceled and none failed
- Make build status canceled if any of the jobs was canceled and none failed
- Remove future dates from contribution calendar graph.
- Remove future dates from contribution calendar graph.
- Support e-mail notifications for comments on project snippets
- Support e-mail notifications for comments on project snippets
...
...
app/controllers/admin/impersonations_controller.rb
View file @
731b2313
...
@@ -7,6 +7,8 @@ class Admin::ImpersonationsController < Admin::ApplicationController
...
@@ -7,6 +7,8 @@ class Admin::ImpersonationsController < Admin::ApplicationController
warden
.
set_user
(
impersonator
,
scope: :user
)
warden
.
set_user
(
impersonator
,
scope: :user
)
Gitlab
::
AppLogger
.
info
(
"User
#{
original_user
.
username
}
has stopped impersonating
#{
impersonator
.
username
}
"
)
session
[
:impersonator_id
]
=
nil
session
[
:impersonator_id
]
=
nil
redirect_to
admin_user_path
(
original_user
)
redirect_to
admin_user_path
(
original_user
)
...
...
app/controllers/admin/users_controller.rb
View file @
731b2313
...
@@ -41,6 +41,8 @@ class Admin::UsersController < Admin::ApplicationController
...
@@ -41,6 +41,8 @@ class Admin::UsersController < Admin::ApplicationController
warden
.
set_user
(
user
,
scope: :user
)
warden
.
set_user
(
user
,
scope: :user
)
Gitlab
::
AppLogger
.
info
(
"User
#{
current_user
.
username
}
has started impersonating
#{
user
.
username
}
"
)
flash
[
:alert
]
=
"You are now impersonating
#{
user
.
username
}
"
flash
[
:alert
]
=
"You are now impersonating
#{
user
.
username
}
"
redirect_to
root_path
redirect_to
root_path
...
...
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