Changes between Version 6 and Version 7 of TracPermissionFilterPlugin
- Timestamp:
- Nov 9, 2015, 1:40:52 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracPermissionFilterPlugin
v6 v7 5 5 == Description 6 6 7 Pluginto remove Trac permissions using a blacklist and/or a whitelist.7 This plugin allows you to remove Trac permissions using a blacklist and/or a whitelist. 8 8 9 9 This hack was born to be able to ''archive'' projects without touching the Trac database, the idea is to use the filter to disable all permissions that allow users to modify it without changing their permissions on the database and be able to restore the project to the original state simply disabling the filter. … … 13 13 The process is as follows: 14 14 15 1. If the `blacklist` is available and the permission being considered is on the list the `check_permission` function returns `False` and the 16 permission evaluation stops. 15 1. If the `blacklist` is available and the permission being considered is on the list the `check_permission` function returns `False` and the permission evaluation stops. 17 16 1. If the `whitelist` is available and the permission we are checking is not on the list the `check_permission` function returns `False` and the permission evaluation stops. 18 17 1. If the evaluation gets here the permission is ignored by the plugin and the next permission policy is checked. … … 26 25 27 26 If you have any issues, create a 28 [ http://trac-hacks.org/newticket?component=TracPermissionFilterPlugin&owner=stonew ticket].27 [/newticket?component=TracPermissionFilterPlugin new ticket]. 29 28 30 29 [[TicketQuery(component=TracPermissionFilterPlugin&group=type,format=progress)]] … … 32 31 == Download 33 32 34 Download the zipped source from [ download:tracpermissionfilterplugin here].33 Download the zipped source from [export:tracpermissionfilterplugin here]. 35 34 36 35 == Source 37 36 38 You can check out TracPermissionFilterPlugin from [http://trac-hacks.org/svn/tracpermissionfilterplugin here] using Subversion, or [source:tracpermissionfilterplugin browse the source] with Trac. 37 You can check out TracPermissionFilterPlugin from [/svn/tracpermissionfilterplugin here] using Subversion, or [source:tracpermissionfilterplugin browse the source] with Trac. 38 39 == Installation 40 41 General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. 39 42 40 43 == Configuration 41 44 42 After enabling the plugin in your `trac.ini` :45 After enabling the plugin in your `trac.ini` file: 43 46 44 {{{ 45 #!ini 47 {{{#!ini 46 48 [components] 47 49 tracpermissionfilter.* = enabled … … 50 52 Add a section with the list of permissions to allow: 51 53 52 {{{ 53 #!ini 54 {{{#!ini 54 55 [permission-filter] 55 56 whitelist = BROWSER_VIEW,CHANGESET_VIEW,FILE_VIEW,LOG_VIEW,MILESTONE_VIEW,REPORT_SQL_VIEW,REPORT_VIEW,ROADMAP_VIEW,SEARCH_VIEW,TICKET_VIEW,TIMELINE_VIEW,WIKI_VIEW … … 58 59 or a list of permissions to deny: 59 60 60 {{{ 61 #!ini 61 {{{#!ini 62 62 [permission-filter] 63 63 blacklist = BROWSER_VIEW … … 68 68 The plugin has also an additional boolean option called `adminmeta`. If this option is set to True (the default), then the filters don't affect the users with `TRAC_ADMIN` permission: 69 69 70 {{{ 71 #!ini 70 {{{#!ini 72 71 [permission-filer] 73 72 adminmeta = true … … 78 77 Lastly, remember to put the filter the first on your project `permission_policies`: 79 78 80 {{{ 81 #!ini 79 {{{#!ini 82 80 [trac] 83 81 permission_policies = PermissionFilter, DefaultPermissionPolicy