puppetlabs/razor-server — pull request #113 by ChrisPortman (2013-11-28 23:22:21+00:00)
Title: Add ability for policy to match nodes that have AnyOf or NoneOf the policy tags.

Adding match_tags field to policies

The match_tags field will allow you to specify the way in which the list
of tags on a policy will be used. Available options are 'AllOf',
'AnyOf' or 'NoneOf'.

For backwards compatibility, the default will be "AllOf" if "match_tags"
is not supplied during a 'create-policy' operation. Also in the
application of the included DB migrate script, any existing policies
will be set as "AllOf".

There was also a bug in the policy binding SQL code in
/lib/razor/data/policy.rb that meant that policies with no tags were not
excluded from matches.

This is in relation to #108 which I know is still up for debate, but it was pretty simple to implement...