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
be419da1
Commit
be419da1
authored
May 08, 2020
by
Jason Goodman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Spring reloading AdminMode::Client
Prefix modules and classes with double colon
parent
23fad217
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/sidekiq_middleware/admin_mode/client.rb
lib/gitlab/sidekiq_middleware/admin_mode/client.rb
+4
-4
No files found.
lib/gitlab/sidekiq_middleware/admin_mode/client.rb
View file @
be419da1
...
...
@@ -8,7 +8,7 @@ module Gitlab
# If enabled then it injects a job field that persists through the job execution
class
Client
def
call
(
_worker_class
,
job
,
_queue
,
_redis_pool
)
return
yield
unless
Feature
.
enabled?
(
:user_mode_in_session
)
return
yield
unless
::
Feature
.
enabled?
(
:user_mode_in_session
)
# Admin mode enabled in the original request or in a nested sidekiq job
admin_mode_user_id
=
find_admin_user_id
...
...
@@ -16,7 +16,7 @@ module Gitlab
if
admin_mode_user_id
job
[
'admin_mode_user_id'
]
||=
admin_mode_user_id
Gitlab
::
AppLogger
.
debug
(
"AdminMode::Client injected admin mode for job:
#{
job
.
inspect
}
"
)
::
Gitlab
::
AppLogger
.
debug
(
"AdminMode::Client injected admin mode for job:
#{
job
.
inspect
}
"
)
end
yield
...
...
@@ -25,8 +25,8 @@ module Gitlab
private
def
find_admin_user_id
Gitlab
::
Auth
::
CurrentUserMode
.
current_admin
&
.
id
||
Gitlab
::
Auth
::
CurrentUserMode
.
bypass_session_admin_id
::
Gitlab
::
Auth
::
CurrentUserMode
.
current_admin
&
.
id
||
::
Gitlab
::
Auth
::
CurrentUserMode
.
bypass_session_admin_id
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