def has_role_with(object)
      if object.respond_to?(:user_id)
        if object.user_id == actor.id
          return IS_OWNER
        else
          return IS_UNRELATED
        end
      end
      # hopefully the object passed always responds to user_id
      IS_UNRELATED
    end
def has_role_with(object)
      if object.respond_to?(:user_id)
        if object.user_id == actor.id
          return IS_OWNER
        else
          return IS_UNRELATED
        end
      end
      # hopefully the object passed always responds to user_id
      IS_UNRELATED
    end
This method can also be overridden if one desires to have multiple types of
 ownership, such as a collaborator-type relationship

 @param [ActiveRecord::Base] object should be the object that is being tested
   if the user can perform the action on
 @return [Number] true if self owns object