Changes between Version 5 and Version 6 of TracPermissionFilterPlugin


Ignore:
Timestamp:
Mar 13, 2015, 10:09:01 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes, tagged with license

Legend:

Unmodified
Added
Removed
Modified
  • TracPermissionFilterPlugin

    v5 v6  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = TracPermissionFilterPlugin =
     3= Remove Trac permissions using a blacklist and/or whitelist
    44
    5 == Description ==
     5== Description
    66
    77Plugin to remove Trac permissions using a blacklist and/or a whitelist.
    88
    9 This hack was born to be able to ''archive'' projects without touching the
    10 Trac database, the idea is to use the filter to disable all permissions that
    11 allow users to modify it without changing their permissions on the database
    12 and be able to restore the project to the original state simply disabling the
    13 filter.
     9This 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.
    1410
    15 To filter permissions as desired the plugin has to be the first one on the
    16 `permission_policy` list and it works by checking the permissions against the
    17 blacklist and the whitelist in that order (if a permission is in both lists it
    18 is blacklisted).
     11To filter permissions as desired the plugin has to be the first one on the `permission_policy` list and it works by checking the permissions against the blacklist and the whitelist in that order. If a permission is in both lists it is blacklisted.
    1912
    2013The process is as follows:
    2114
    22  1. If the `blacklist` is available and the permission being considered is on
    23     the list the `check_permission` function returns `False` and the
     15 1. If the `blacklist` is available and the permission being considered is on the list the `check_permission` function returns `False` and the
    2416    permission evaluation stops.
     17 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 1. If the evaluation gets here the permission is ignored by the plugin and the next permission policy is checked.
    2519
    26  2. If the `whitelist` is available and the permission we are checking is not
    27     on the list the `check_permission` function returns `False` and the
    28     permission evaluation stops.
     20If the boolean option `adminmeta` is True, then the filters are ignored for users with the `TRAC_ADMIN` permission.
    2921
    30  3. If the evaluation gets here the permission is ignored by the plugin and
    31     the next permission policy is checked.
    32 
    33 If the boolean option `adminmeta` is True the filters are ignored for users
    34 with TRAC_ADMIN permission.
    35 
    36 == Bugs/Feature Requests ==
     22== Bugs/Feature Requests
    3723
    3824Existing bugs and feature requests for TracPermissionFilterPlugin are
     
    4228[http://trac-hacks.org/newticket?component=TracPermissionFilterPlugin&owner=sto new ticket].
    4329
    44 == Download ==
     30[[TicketQuery(component=TracPermissionFilterPlugin&group=type,format=progress)]]
     31
     32== Download
    4533
    4634Download the zipped source from [download:tracpermissionfilterplugin here].
    4735
    48 == Source ==
     36== Source
    4937
    5038You can check out TracPermissionFilterPlugin from [http://trac-hacks.org/svn/tracpermissionfilterplugin here] using Subversion, or [source:tracpermissionfilterplugin browse the source] with Trac.
    5139
    52 == Example ==
     40== Configuration
    5341
    5442After enabling the plugin in your `trac.ini`:
     
    5644{{{
    5745#!ini
     46[components]
    5847tracpermissionfilter.* = enabled
    5948}}}
     
    7564}}}
    7665
    77 The use of the two lists (black and white) makes sense when using inheritance,
    78 to avoid repeating long lists (i. e., we can have a long whitelist and reduce it only
    79 in one project using the blacklist).
     66The use of the two lists (black and white) makes sense when using inheritance to avoid repeating long lists. For example, we can have a long whitelist and reduce it only in one project using the blacklist.
    8067
    81 The plugin has also an additional boolean option called `adminmeta`.
    82 If this option is set to True (the default) the filters don't affect the users with
    83 TRAC_ADMIN permission:
     68The 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:
    8469
    8570{{{
     
    8974}}}
    9075
    91 If the variable is set to `False` filtering has odd effects on users with
    92 TRAC_ADMIN permission because we reject based on `action` name and
    93 TRAC_ADMIN is a meta permission that usually is not checked directly
     76If the variable is set to `False` filtering has odd effects on users with the `TRAC_ADMIN` permission because we reject based on `action` name and `TRAC_ADMIN` is a meta permission that usually is not checked directly.
    9477
    9578Lastly, remember to put the filter the first on your project `permission_policies`:
     
    10184}}}
    10285
    103 == Recent Changes ==
     86== Recent Changes
    10487
    10588[[ChangeLog(tracpermissionfilterplugin, 3)]]
    10689
    107 == Author/Contributors ==
     90== Author/Contributors
    10891
    10992'''Author:''' [wiki:sto] [[BR]]
    110 '''Maintainer:''' [wiki:sto] [[BR]]
     93'''Maintainer:''' [[Maintainer]] [[BR]]
    11194'''Contributors:'''