Changes between Version 3 and Version 4 of ProtectedMacro
- Timestamp:
- Dec 22, 2008, 7:01:30 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ProtectedMacro
v3 v4 3 3 == Description == 4 4 5 With th is plugin certain parts of a wiki page can be shielded from reading.5 With the TracProtected macro it is possible to limit access to parts of a wiki page. 6 6 7 There are four explicit permissions. PROTECTED_VIEW, PROTECTED_RED_VIEW, PROTECTED_BLUE_VIEW, and PROTECTED_GREEN_VIEW. Each of these permissions allows view access to different parts (as seen in the examples below) 7 A protected part has the following syntax: 8 {{{ 9 {{{ 10 #!protected 11 #:This is what an unauthorized user sees (optional) 12 This is what an authorized user sees 13 }}} 14 }}} 8 15 9 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. 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. 22 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. 26 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: 34 {{{ 35 [trac] 36 permission_policies = ProtectedAttachmentPolicy, DefaultPermissionPolicy 37 }}} 10 38 11 39 Note: a user who is allowed to edit the wiki page will always be able to see (and edit) protected parts. … … 15 43 * Supply an admin feature to add/edit protected-xxx 16 44 * Supply an admin feature to edit the style/template for a permission part 45 * Give visual feedback for unauthorized attachments in the attachment list 17 46 18 47 == Bugs/Feature Requests ==