gen_file_publisher_rule

in itchef/cookbooks/cpe_applocker/libraries/applocker_helpers.rb [199:222]


    def gen_file_publisher_rule(rule, xml)
      xml.FilePublisherRule(:Name => rule['name'],
                            :Id => rule['id'],
                            :Description => rule['description'],
                            :Action => rule['action'],
                            :UserOrGroupSid => rule['user_or_group_sid']) do
        xml.Conditions do
          rule['conditions'].each do |condition|
            xml.FilePublisherCondition(:PublisherName =>
                                          condition['publisher'],
                                       :ProductName =>
                                          condition['product_name'],
                                       :BinaryName =>
                                          condition['binary_name']) do
              xml.BinaryVersionRange(
                :LowSection => condition['binary_version']['low'],
                :HighSection => condition['binary_version']['high'],
              ) 
            end 
          end 
        end 
      end 
    end