projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bb15e0
)
Allow abilities that require no login for token based access
author
Tom Hughes
<tom@compton.nu>
Wed, 12 Dec 2018 22:41:29 +0000
(22:41 +0000)
committer
Tom Hughes
<tom@compton.nu>
Wed, 12 Dec 2018 22:41:29 +0000
(22:41 +0000)
Fixes #2085
app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/application_controller.rb
b/app/controllers/application_controller.rb
index 0411f75c425bfe8621f5716841a55db9ea6c5316..d4bbc1f9b7147ada16f015a77f73a0fb56168aac 100644
(file)
--- a/
app/controllers/application_controller.rb
+++ b/
app/controllers/application_controller.rb
@@
-448,7
+448,7
@@
class ApplicationController < ActionController::Base
def current_ability
# Use capabilities from the oauth token if it exists and is a valid access token
if Authenticator.new(self, [:token]).allow?
-
Capability.new(current_token
)
+
Ability.new(nil).merge(Capability.new(current_token)
)
else
Ability.new(current_user)
end