Changes between Version 11 and Version 12 of ComponentPermissionsPlugin


Ignore:
Timestamp:
Feb 5, 2016, 8:47:21 PM (8 years ago)
Author:
figaro
Comment:

Hosted on github

Legend:

Unmodified
Added
Removed
Modified
  • ComponentPermissionsPlugin

    v11 v12  
    55== Description
    66
    7 This plugin provides permissions based on ticket components. For example, having a component `foobar` it will provide permission `COMPONENT_FOOBAR_VIEW` which is then required to access the ticket with this component.
     7This plugin provides permissions based on ticket components. For example, having a component `foobar` it will provide permission `COMPONENT_FOOBAR_VIEW`, which is then required to access the ticket with this component.
    88
    99== Bugs/Feature Requests
     
    2525}}}
    2626
    27 For more information, please follow [http://trac.edgewall.org/wiki/TracPlugins#InstallingaTracPlugin documentation] on how to install Trac's plugins.
     27For more information, please follow [t:wiki:TracPlugins#InstallingaTracPlugin documentation] on how to install Trac plugins.
    2828
    2929== Configuration
     
    3131After installation you have to configure which field it checks to enable component permission checking:
    3232
    33 {{{
    34 #!ini
     33{{{#!ini
    3534[component-permissions]
    3635allow_reporter = false
     
    4342You should also add the component near the beginning of the `permission_policies` list:
    4443
    45 {{{
    46 #!ini
     44{{{#!ini
    4745permission_policies = ComponentPermissionsPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
    4846}}}
     
    5048Additionally, you can require component permission only when a configured ticket field is checked. For example, this can be such custom ticket field:
    5149
    52 {{{
    53 #!ini
     50{{{#!ini
    5451[ticket-custom]
    5552privacy = checkbox
     
    6057And you configure this plugin to use it:
    6158
    62 {{{
    63 #!ini
     59{{{#!ini
    6460[component-permissions]
    6561ticket_field_name = privacy
    6662}}}
    6763
    68 This will require component permission only when ticket is marked as privacy sensitive.
     64This will require component permission only when the ticket is marked as privacy sensitive.
    6965
    7066If you want only some components to have limited access, simply assign other components' permissions to the anonymous user.
     
    7268There is also a special permission `COMPONENT_VIEW` which gives the user (or group) permission to see any ticket otherwise limited by component permissions.
    7369
    74 If you want to allow ticket reporter, owner or users in CC list to have access to the ticket regardless of component permissions, you can set `allow_reporter`, `allow_owner`, and `allow_cc` to `true`, respectively. You can also use `allow_cc_email` to specify user's by their e-mail address (even if such user does not yet exist), but be careful, make sure users' e-mails are verified and that they cannot be freely changed to arbitrary values.
     70If you want to allow ticket reporter, owner or users in CC list to have access to the ticket regardless of component permissions, you can set `allow_reporter`, `allow_owner`, and `allow_cc` to `true`, respectively. You can also use `allow_cc_email` to specify user's by their e-mail address (even if such user does not yet exist). However be careful: make sure users' email addresses are verified and that they cannot be freely changed to arbitrary values.
    7571
    7672Setting `hide_components` to `true` will hide components from ticket and other forms if user does not have permission for them. Works if not using a custom field.