Changes between Version 4 and Version 5 of ProtectedMacro


Ignore:
Timestamp:
Dec 22, 2008, 8:57:52 AM (6 years ago)
Author:
frayja
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProtectedMacro

    v4 v5  
    22
    33== Description ==
     4
     5=== Wiki ===
    46
    57With the TracProtected macro it is possible to limit access to parts of a wiki page.
     
    1416}}}                                               
    1517
    16 A protected part can use !protected, !protected-red,
    17 !protected-blue, or !protected-green to provide access           
    18 restrictions on different levels. Users will only see these       
    19 protected sections when they have the permissions                 
    20 "PROTECTED_VIEW", "PROTECTED_RED_VIEW", "PROTECTED_BLUE_VIEW", or
    21 "PROTECTED_GREEN_VIEW", respectively.                             
     18A 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.
    2219
    23 A #!protected part will be rendered with a red line to the left, a
    24 #!protected-blue part will be rendered with a blue line to the
    25 left, etc.
     20Note: a user who is allowed to edit the wiki page will always be able to see (and edit) protected parts.
    2621
    27 Attachments are protected when the key-string "!protected",   
    28 "!protected-red", "!protected-blue", or "!protected-green" is
    29 present in the attachment's description.                     
    30                                                              
    31 To enable the attachment protection the conf/trac.ini must be
    32 modified. Add the ProtectedAttachmentPolicy to the           
    33 permission_policies:                                         
     22=== Attachment ===
     23
     24Attachments 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.
     25
     26To enable the attachment protection the conf/trac.ini must be modified. Add the ProtectedAttachmentPolicy to the permission_policies:                                         
    3427{{{
    3528[trac]                                                                 
     
    3730}}}
    3831
    39 Note: a user who is allowed to edit the wiki page will always be able to see (and edit) protected parts.
     32=== Improvements ===
    4033
    41 Improvements:
    4234 * Filter out hidden parts when editing a wiki page
    4335 * Supply an admin feature to add/edit protected-xxx
     
    6658{{{
    6759#!protected
    68 #: This will only be visible to those that do not have the PROTECTED_VIEW
     60#:This will only be visible to those that do not have the PROTECTED_VIEW
    6961This will only be visible to those that have PROTECTED_VIEW
    7062Will show all content with a red line to the left
     
    7365{{{
    7466#!protected-red
    75 #: This will only be visible to those that do not have the PROTECTED_RED_VIEW
    76 This will only be visible to those that have PROTECTED_RED_VIEW
     67#:This will only be visible to those that do not have the PROTECTED_RED_VIEW permission
     68This will only be visible to those that have the PROTECTED_RED_VIEW permission
    7769Will show all content with a red line to the left
    7870}}}
     
    8072{{{
    8173#!protected-blue
    82 #: This will only be visible to those that do not have the PROTECTED_BLUE_VIEW
    83 This will only be visible to those that have PROTECTED_BLUE_VIEW
    84 Will show all content with a blue line to the left
    85 }}}
    86 
    87 {{{
    88 #!protected-green
    89 #: This will only be visible to those that do not have the PROTECTED_GREEN_VIEW
    90 This will only be visible to those that have PROTECTED_GREEN_VIEW
    91 Will show all content with a green line to the left
     74#:[[Include(wiki:RestrictedSection)]]
     75This will only be visible to those that have the PROTECTED_BLUE_VIEW permission.
     76Those that do not have this permission will wee the wiki page called RestictedSection
    9277}}}
    9378}}}