提交 6d92aa6d 编写于 作者: R randx

Fix IssueObserver current_user assign. Refactored observers

上级 55f83385
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册