diff options
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] |