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
Kazuhiko Shiozaki
gitlab-ce
Commits
a7be3dfa
Commit
a7be3dfa
authored
Jun 10, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove set of thread variables
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
772f2f1a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
34 deletions
+1
-34
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+0
-10
app/observers/base_observer.rb
app/observers/base_observer.rb
+0
-8
lib/api/helpers.rb
lib/api/helpers.rb
+0
-10
lib/gitlab/seeder.rb
lib/gitlab/seeder.rb
+1
-6
No files found.
app/controllers/application_controller.rb
View file @
a7be3dfa
...
@@ -4,7 +4,6 @@ class ApplicationController < ActionController::Base
...
@@ -4,7 +4,6 @@ class ApplicationController < ActionController::Base
before_filter
:authenticate_user!
before_filter
:authenticate_user!
before_filter
:reject_blocked!
before_filter
:reject_blocked!
before_filter
:check_password_expiration
before_filter
:check_password_expiration
around_filter
:set_current_user_for_thread
before_filter
:add_abilities
before_filter
:add_abilities
before_filter
:ldap_security_check
before_filter
:ldap_security_check
before_filter
:dev_tools
if
Rails
.
env
==
'development'
before_filter
:dev_tools
if
Rails
.
env
==
'development'
...
@@ -53,15 +52,6 @@ class ApplicationController < ActionController::Base
...
@@ -53,15 +52,6 @@ class ApplicationController < ActionController::Base
end
end
end
end
def
set_current_user_for_thread
Thread
.
current
[
:current_user
]
=
current_user
begin
yield
ensure
Thread
.
current
[
:current_user
]
=
nil
end
end
def
abilities
def
abilities
@abilities
||=
Six
.
new
@abilities
||=
Six
.
new
end
end
...
...
app/observers/base_observer.rb
View file @
a7be3dfa
...
@@ -10,12 +10,4 @@ class BaseObserver < ActiveRecord::Observer
...
@@ -10,12 +10,4 @@ class BaseObserver < ActiveRecord::Observer
def
log_info
message
def
log_info
message
Gitlab
::
AppLogger
.
info
message
Gitlab
::
AppLogger
.
info
message
end
end
def
current_user
Thread
.
current
[
:current_user
]
end
def
current_commit
Thread
.
current
[
:current_commit
]
end
end
end
lib/api/helpers.rb
View file @
a7be3dfa
...
@@ -36,16 +36,6 @@ module API
...
@@ -36,16 +36,6 @@ module API
end
end
end
end
def
set_current_user_for_thread
Thread
.
current
[
:current_user
]
=
current_user
begin
yield
ensure
Thread
.
current
[
:current_user
]
=
nil
end
end
def
user_project
def
user_project
@project
||=
find_project
(
params
[
:id
])
@project
||=
find_project
(
params
[
:id
])
@project
||
not_found!
@project
||
not_found!
...
...
lib/gitlab/seeder.rb
View file @
a7be3dfa
...
@@ -9,12 +9,7 @@ module Gitlab
...
@@ -9,12 +9,7 @@ module Gitlab
end
end
def
self
.
by_user
(
user
)
def
self
.
by_user
(
user
)
begin
yield
Thread
.
current
[
:current_user
]
=
user
yield
ensure
Thread
.
current
[
:current_user
]
=
nil
end
end
end
def
self
.
mute_mailer
def
self
.
mute_mailer
...
...
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