diff options
author | rautenberg <rautenberg@in-silico.ch> | 2012-10-05 12:33:53 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2012-10-05 12:33:53 +0200 |
commit | f393427d352d68467d8f2010f0a1c7b9990b7bb1 (patch) | |
tree | 31a518da8d2f1dbe58291b01fa294d73a47cdef2 /lib/authorization.rb | |
parent | b4ba72cd339f4067ab411dbd51beabf22a2e23e2 (diff) |
methode to check URI-owner
Diffstat (limited to 'lib/authorization.rb')
-rw-r--r-- | lib/authorization.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/authorization.rb b/lib/authorization.rb index 438c7c6..1fe5c51 100644 --- a/lib/authorization.rb +++ b/lib/authorization.rb @@ -164,6 +164,13 @@ module OpenTox end end + #Returns true or false if owner (who created the first policy) of an URI + # @param [String, String]uri,subjectid + # return [Boolean]true,false status of ownership of the URI + def self.uri_owner?(uri, subjectid) + get_uri_owner(uri, subjectid) == get_user(subjectid) + end + #Checks if a policy exists to a URI. Requires URI and token. # @param [String, String]uri,subjectid # return [Boolean] |