diff options
author | gebele <gebele@in-silico.ch> | 2011-09-01 14:26:11 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2011-09-01 14:26:11 +0200 |
commit | 2af125034fac1822727d1af581e134dd49ca35f8 (patch) | |
tree | 93d2c65a87162b1d04fdf365ea9ab239b3f40c28 | |
parent | 6d866c2fc82fd3aeacec994659aea4a104c21e4c (diff) |
check for group authorization
-rw-r--r-- | helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -8,6 +8,14 @@ helpers do end return false end + + def is_group_authorized(user) + if OpenTox::Authorization.list_uri_policies(uri, session[:subjectid]).each{|pol| pol}.include?OpenTox::Authorization.list_user_groups(user, session[:subjectid]).each{|ug| ug} + else + return true + end + return false + end def hide_link(destination) @link_id = 0 unless @link_id |