projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd0cdaa
)
allow current_user => nil for pages that do not require login
author
Tom Clegg <tom@clinicalfuture.com>
Sun, 3 Feb 2013 08:56:45 +0000
(
00:56
-0800)
committer
Tom Clegg <tom@clinicalfuture.com>
Sun, 3 Feb 2013 08:56:45 +0000
(
00:56
-0800)
app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/application_controller.rb
b/app/controllers/application_controller.rb
index eb4d62ca570f54bb96e8d1750b6aa9c674dea39a..4ce0d55ba0351866866a648ad126e3c3dc50f996 100644
(file)
--- a/
app/controllers/application_controller.rb
+++ b/
app/controllers/application_controller.rb
@@
-64,7
+64,9
@@
class ApplicationController < ActionController::Base
end
def current_user
- @current_user ||= User.current
+ if Thread.current[:api_token]
+ @current_user ||= User.current
+ end
end
protected