summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-02-10 15:25:48 +0100
committermguetlein <martin.guetlein@gmail.com>2011-02-10 15:25:48 +0100
commit1f6625cffbb49ec93f6b4647ca1d11d01c5d11ea (patch)
tree4ee359f191276bb2d56d11557149ac27d11519b1
parent0011577686ede0b2670b7ad791185fef5871fee1 (diff)
A&A hack for report svgs
-rw-r--r--lib/helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/helper.rb b/lib/helper.rb
index 5a2436f..191b932 100644
--- a/lib/helper.rb
+++ b/lib/helper.rb
@@ -19,6 +19,8 @@ helpers do
#Check Authorization for URI with method and subjectid.
def authorized?(subjectid)
+ # hack for reports, address problem as soon as subjectid is not longer allowed as param
+ return true if request.env['REQUEST_URI'] =~ /validation\/report\/.*svg$/
request_method = request.env['REQUEST_METHOD']
uri = clean_uri("#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}#{request.env['REQUEST_URI']}")
request_method = "GET" if request_method == "POST" && uri =~ /\/model\/\d+\/?$/