summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrautenberg <rautenberg@in-silico.ch>2012-08-07 09:28:23 +0200
committerrautenberg <rautenberg@in-silico.ch>2012-08-07 09:28:23 +0200
commit5e83b84dbc4091167d11195db6e8680c8d11b320 (patch)
tree39a216392ed4ccc3c05fdc10d05412404b653ead
parentc530786c93c05ce83b0c88f14c2bb72c0347ba0b (diff)
replace raise with new error helpers
-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