Here are a couple of useful things for Trac 0.11 and newer that can be used under the same license as Trac:
There is a better new patch in a Meruciral repository in authz_policy repository folder
(to get code:
hg clone http://gw.tnode.com/trac/f/authz_policy, to get latest version of the patch:
cd authz_policy; hg diff -r 0)
OLD: Here you can find a patch for plugin
authz_policy.py(rev. 7457) that adds support for Trac groups. It is a little unusual that you need to define groups in a special permissions file
authzpolicy.conf(as described on TracFineGrainedPermissions) instead of going under Admin/Permissions and configuring groups with the option Add Subject to Group. So here is a patch called authz_policy.py_trac-groups-support_rev7457.patch against revision 7457 of this plugin that adds this feature.