summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-03-17 13:08:41 +0100
committerChristoph Helma <helma@in-silico.ch>2011-03-17 13:08:41 +0100
commit6edd281efdd33cf8842e79135bfd3b69d0949bce (patch)
tree1820d3296bb3f76a8acf41eb2601745ea0ca1a0b
parent95d6920fada55f7afd7a5c815e0d02a9dc83968b (diff)
parenta799b1021f8da298f76aba6482f4ea35a3a1c67f (diff)
Merge branch 'release/v1.0.3'v1.0.3
-rw-r--r--helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/helper.rb b/helper.rb
index 0813fff..7d7a856 100644
--- a/helper.rb
+++ b/helper.rb
@@ -31,8 +31,10 @@ helpers do
end
def is_authorized(uri, action)
- if session[:subjectid] != nil
- return OpenTox::Authorization.authorize(uri, action, session[:subjectid])
+ if OpenTox::Authorization.server && session[:subjectid] != nil
+ return OpenTox::Authorization.authorized?(uri, action, session[:subjectid])
+ else
+ return true
end
return false
end