From f393427d352d68467d8f2010f0a1c7b9990b7bb1 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Fri, 5 Oct 2012 12:33:53 +0200 Subject: methode to check URI-owner --- lib/authorization.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/authorization.rb') 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] -- cgit v1.2.3