Changes between Version 11 and Version 12 of ProtectedMacro


Ignore:
Timestamp:
Aug 23, 2016, 6:43:44 PM (5 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • ProtectedMacro

    v11 v12  
    99With the Trac Protected macro it is possible to limit access to parts of a wiki page.
    1010
    11 A protected part has the following syntax:         
     11A protected part has the following syntax:
    1212{{{
    13 {{{                                                
    14 #!protected                                       
     13{{{         
     14#!protected
    1515#:This is what an unauthorized user sees (optional)
    16 This is what an authorized user sees               
     16This is what an authorized user sees
    1717}}}
    18 }}}                                               
     18}}}
    1919
    2020A protected part can use !protected, !protected-red, !protected-blue, or !protected-green to provide access restrictions on different levels. Users will only see these protected sections when they have the permissions `PROTECTED_VIEW`, `PROTECTED_RED_VIEW`, `PROTECTED_BLUE_VIEW`, or `PROTECTED_GREEN_VIEW` respectively. A !protected part will be rendered with a red line to the left, a !protected-blue part will be rendered with a blue line to the left, etc.
    2121
    22 Note: when searching though the wiki the protected parts are still shown
     22'''Note''': when searching though the wiki the protected parts are still shown.
    2323
    2424=== Attachment
     
    2626Attachments are protected when the key-string "!protected", "!protected-red", "!protected-blue", or "!protected-green" is present in the attachment's description. Users will only see these protected attachments when they have the permissions `PROTECTED_VIEW`, `PROTECTED_RED_VIEW`, `PROTECTED_BLUE_VIEW` or `PROTECTED_GREEN_VIEW` respectively.
    2727
    28 To enable the attachment protection the conf/trac.ini must be modified. Add the ProtectedAttachmentPolicy to the permission_policies:                                         
     28To enable the attachment protection the conf/trac.ini must be modified. Add the ProtectedAttachmentPolicy to the permission_policies:
    2929{{{#!ini
    30 [trac]                                                                 
     30[trac]
    3131permission_policies = ProtectedAttachmentPolicy, DefaultPermissionPolicy
    3232}}}