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
6d92aa6d
Commit
6d92aa6d
authored
Jun 24, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix IssueObserver current_user assign. Refactored observers
parent
55f83385
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
1 deletion
+9
-1
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+9
-1
app/observers/activity_observer.rb
app/observers/activity_observer.rb
+0
-0
app/observers/issue_observer.rb
app/observers/issue_observer.rb
+0
-0
app/observers/key_observer.rb
app/observers/key_observer.rb
+0
-0
app/observers/mailer_observer.rb
app/observers/mailer_observer.rb
+0
-0
app/observers/project_observer.rb
app/observers/project_observer.rb
+0
-0
app/observers/user_observer.rb
app/observers/user_observer.rb
+0
-0
No files found.
app/controllers/application_controller.rb
View file @
6d92aa6d
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:reject_blocked!
before_filter
:set_current_user_for_mailer
,
:check_token_auth
before_filter
:set_current_user_for_mailer
before_filter
:check_token_auth
before_filter
:set_current_user_for_observers
protect_from_forgery
helper_method
:abilities
,
:can?
rescue_from
Gitlab
::
Gitolite
::
AccessDenied
do
|
exception
|
...
...
@@ -58,6 +62,10 @@ class ApplicationController < ActionController::Base
MailerObserver
.
current_user
=
current_user
end
def
set_current_user_for_observers
IssueObserver
.
current_user
=
current_user
end
def
abilities
@abilities
||=
Six
.
new
end
...
...
app/
model
s/activity_observer.rb
→
app/
observer
s/activity_observer.rb
View file @
6d92aa6d
File moved
app/
model
s/issue_observer.rb
→
app/
observer
s/issue_observer.rb
View file @
6d92aa6d
File moved
app/
model
s/key_observer.rb
→
app/
observer
s/key_observer.rb
View file @
6d92aa6d
File moved
app/
model
s/mailer_observer.rb
→
app/
observer
s/mailer_observer.rb
View file @
6d92aa6d
File moved
app/
model
s/project_observer.rb
→
app/
observer
s/project_observer.rb
View file @
6d92aa6d
File moved
app/
model
s/user_observer.rb
→
app/
observer
s/user_observer.rb
View file @
6d92aa6d
File moved
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