# Changes between Version 1 and Version 2 of TracFineGrainedPermissions

Ignore:
Timestamp:
Jun 1, 2010 11:09:27 PM (12 years ago)
Comment:

--

### Legend:

Unmodified
 v1 Since 0.11, there's a general mechanism in place that allows custom permission policy plugins to grant or deny any action on any kind of Trac resources, even at the level of specific versions of such resources. Note that for Trac 0.12, authz_policy has been integrated in trunk branch as tracopt.perm.authz_policy.* == Permission Policies == - Put a [http://swapoff.org/files/authzpolicy.conf authzpolicy.conf] file somewhere (preferably on a secured location on the server, not readable for others than the webuser. - Update your trac.ini: 1. modify the [TracIni#trac-section permission_policies] entry in the [trac] section {{{ [trac] ... permission_policies = AuthzPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy }}} 2. add a new [authz_policy] section {{{ [authz_policy] authz_file = /some/trac/env/conf/authzpolicy.conf }}} 3. enable the single file plugin {{{ [components] ... authz_policy = enabled authz_policy.* = enabled }}} That kind of fine-grained permission control needs a definition file, which is the one used by Subversion's mod_authz_svn. More information about this file format and about its usage in Subversion is available in the [http://svnbook.red-bean.com/svnbook/book.html#svn-ch-6-sect-4.4.2 Subversion Book (Per-Directory Access Control)]. More information about this file format and about its usage in Subversion is available in the  [http://svnbook.red-bean.com/en/1.5/svn.serverconfig.pathbasedauthz.html Path-Based Authorization] section in the Server Configuration chapter of the svn book. Example: }}} if you want to support the use of the [''modulename'':/''some''/''path''] syntax within the authz_file, add If you want to support the use of the [''modulename'':/''some''/''path''] syntax within the authz_file, add {{{ }}} where ''modulename'' refers to the same repository indicated by the repository_dir entry in the [trac] section. where ''modulename'' refers to the same repository indicated by the repository_dir entry in the [trac] section. As an example, if the repository_dir entry in the [trac] section is {{{/srv/active/svn/blahblah}}}, that would yield the following: {{{ [trac] authz_file = /path/to/svnaccessfile authz_module_name = blahblah ... repository_dir = /srv/active/svn/blahblah }}} where the svn access file, {{{/path/to/svnaccessfile}}}, contains entries such as {{{[blahblah:/some/path]}}}. '''Note:''' Usernames inside the Authz file __must__ be the same as those used inside trac.