summaryrefslogtreecommitdiff
path: root/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'helper.rb')
-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