summaryrefslogtreecommitdiff
path: root/lib/authorization-helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/authorization-helper.rb')
-rw-r--r--lib/authorization-helper.rb4
1 files changed, 2 insertions, 2 deletions
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