diff options
author | rautenberg <rautenberg@in-silico.ch> | 2013-08-06 14:57:18 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2013-08-06 14:57:18 +0200 |
commit | 6b3a9bc829ea78bc778c321502958b5b1bfc3087 (patch) | |
tree | 40172d0f590ef1aa459c75c5fdb8fff70287ee1e /lib/authorization-helper.rb | |
parent | 4b2acd3e1ded3819e6aea616180459c38ce3b4d3 (diff) |
move policy management to opentox-server
Diffstat (limited to 'lib/authorization-helper.rb')
-rw-r--r-- | lib/authorization-helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/authorization-helper.rb b/lib/authorization-helper.rb index 625c99f..0a03d38 100644 --- a/lib/authorization-helper.rb +++ b/lib/authorization-helper.rb @@ -37,7 +37,7 @@ module OpenTox # Checks session and valid subjectid token. # @return [Boolean] true/false def logged_in() - return true if !$aa[:uri] + return true if !$aa[SERVICE.to_sym][:uri] if session[:subjectid] != nil return OpenTox::Authorization.is_token_valid(session[:subjectid]) end @@ -126,7 +126,7 @@ module OpenTox before do get_subjectid() - unless !$aa[:uri] or login_request? or $aa[:free_request].include?(env['REQUEST_METHOD'].to_sym) + unless !$aa[SERVICE.to_sym][:uri] or login_request? or $aa[SERVICE.to_sym][:free_request].include?(env['REQUEST_METHOD'].to_sym) protected!(@subjectid) end end |