BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
1 deletion
+9
-1
application_controller.rb
app/controllers/application_controller.rb
+9
-1
activity_observer.rb
app/observers/activity_observer.rb
+0
-0
issue_observer.rb
app/observers/issue_observer.rb
+0
-0
key_observer.rb
app/observers/key_observer.rb
+0
-0
mailer_observer.rb
app/observers/mailer_observer.rb
+0
-0
project_observer.rb
app/observers/project_observer.rb
+0
-0
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