diff options
author | rautenberg <rautenberg@in-silico.ch> | 2013-04-26 13:58:57 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2013-04-26 13:58:57 +0200 |
commit | c2164bec5e612dff04189ce24d3966e020f74d6c (patch) | |
tree | b7efaa5d557428c49fda772b02d1ac846d42b4ae | |
parent | 4fe9d9e1d0fdf88a19b5c63c14074e0688505704 (diff) |
add basic A&A
-rw-r--r-- | lib/opentox.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb index eb35b38..070a561 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -117,6 +117,7 @@ module OpenTox post "/#{SERVICE}/?" do @uri = uri("/#{SERVICE}/#{SecureRandom.uuid}") FourStore.put(@uri, @body, @content_type) + Authorization.check_policy(@uri, @subjectid) if $aa[:uri] response['Content-Type'] = "text/uri-list" @uri end @@ -139,6 +140,7 @@ module OpenTox # Delete a resource delete "/#{SERVICE}/:id/?" do FourStore.delete @uri + Authorization.delete_policies_from_uri(@uri, @subjectid) if $aa[:uri] end end |