def obligations (privilege, options = {})
      options = {:context => nil}.merge(options)
      user, roles, privileges = user_roles_privleges_from_options(privilege, options)

      permit!(privilege, :skip_attribute_test => true, :user => user, :context => options[:context])
      
      return [] if roles.is_a?(Array) and not (roles & omnipotent_roles).empty?
      
      attr_validator = AttributeValidator.new(self, user, nil, privilege, options[:context])
      matching_auth_rules(roles, privileges, options[:context]).collect do |rule|
        rule.obligations(attr_validator)
      end.flatten
    end
def obligations (privilege, options = {})
      options = {:context => nil}.merge(options)
      user, roles, privileges = user_roles_privleges_from_options(privilege, options)

      permit!(privilege, :skip_attribute_test => true, :user => user, :context => options[:context])
      
      return [] if roles.is_a?(Array) and not (roles & omnipotent_roles).empty?
      
      attr_validator = AttributeValidator.new(self, user, nil, privilege, options[:context])
      matching_auth_rules(roles, privileges, options[:context]).collect do |rule|
        rule.obligations(attr_validator)
      end.flatten
    end
Returns the obligations to be met by the current user for the given
 privilege as an array of obligation hashes in form of
   [{:object_attribute => obligation_value, ...}, ...]
 where +obligation_value+ is either (recursively) another obligation hash
 or a value spec, such as
   [operator, literal_value]
 The obligation hashes in the array should be OR'ed, conditions inside
 the hashes AND'ed.

 Example
   {:branch => {:company => [:is, 24]}, :active => [:is, true]}

 Options
 [:+context+]  See permit!
 [:+user+]  See permit!