diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-08-07 11:06:52 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-08-07 11:06:52 +0200 |
commit | e6305773737339f05d4688472557b9412a514074 (patch) | |
tree | fd919cab708cdb1de0607e937335271facb61e70 | |
parent | 5765589814513af2c73918ac55eaae46f77b9946 (diff) | |
parent | 5e83b84dbc4091167d11195db6e8680c8d11b320 (diff) |
Merge branch 'development' of github.com:opentox/opentox-server into development
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | lib/authorization-helper.rb | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ source "http://rubygems.org" # Specify your gem's dependencies in opentox-server.gemspec gemspec -gem "opentox-client", :path => "~/opentox-client" +gem "opentox-client", :path => "../opentox-client" diff --git a/lib/authorization-helper.rb b/lib/authorization-helper.rb index 46834c6..b0b5374 100644 --- a/lib/authorization-helper.rb +++ b/lib/authorization-helper.rb @@ -56,10 +56,10 @@ module OpenTox elsif !env["session"] && subjectid unless authorized?(subjectid) $logger.debug "URI not authorized: clean: " + clean_uri("#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}#{request.env['REQUEST_URI']}").sub("http://","https://").to_s + " full: #{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}#{request.env['REQUEST_URI']} with request: #{request.env['REQUEST_METHOD']}" - raise OpenTox::NotAuthorizedError.new "Not authorized" + unauthorized_error "Not authorized" end else - raise OpenTox::NotAuthorizedError.new "Not authorized" unless authorized?(subjectid) + unauthorized_error "Not authorized" unless authorized?(subjectid) end end |