Changes between Version 11 and Version 12 of ProtectedMacro
- Timestamp:
- Aug 23, 2016, 6:43:44 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ProtectedMacro
v11 v12 9 9 With the Trac Protected macro it is possible to limit access to parts of a wiki page. 10 10 11 A protected part has the following syntax: 11 A protected part has the following syntax: 12 12 {{{ 13 {{{ 14 #!protected 13 {{{ 14 #!protected 15 15 #:This is what an unauthorized user sees (optional) 16 This is what an authorized user sees 16 This is what an authorized user sees 17 17 }}} 18 }}} 18 }}} 19 19 20 20 A 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. 21 21 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. 23 23 24 24 === Attachment … … 26 26 Attachments 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. 27 27 28 To enable the attachment protection the conf/trac.ini must be modified. Add the ProtectedAttachmentPolicy to the permission_policies: 28 To enable the attachment protection the conf/trac.ini must be modified. Add the ProtectedAttachmentPolicy to the permission_policies: 29 29 {{{#!ini 30 [trac] 30 [trac] 31 31 permission_policies = ProtectedAttachmentPolicy, DefaultPermissionPolicy 32 32 }}}