| 1 | = Protect parts of a wiki page from invalid access = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | With this plugin certain parts of a wiki page can be shielded from reading. |
| 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) |
| 8 | |
| 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. |
| 10 | |
| 11 | Note: a user who is allowed to edit the wiki page will always be able to see (and edit) protected parts. |
| 12 | |
| 13 | Improvements: |
| 14 | * Supply an admin feature to add/edit permission-xxx |
| 15 | * Supply an admin feature to edit the default responce when no access is granted |
| 16 | * Supply an admin feature to edit the style/template for a permission part |
| 17 | |
| 18 | == Bugs/Feature Requests == |
| 19 | |
| 20 | Existing bugs and feature requests for ProtectedMacro are |
| 21 | [report:9?COMPONENT=ProtectedMacro here]. |
| 22 | |
| 23 | If you have any issues, create a |
| 24 | [http://trac-hacks.org/newticket?component=ProtectedMacro&owner=frayja new ticket]. |
| 25 | |
| 26 | == Download == |
| 27 | |
| 28 | Download the zipped source from [download:protectedmacro here]. |
| 29 | |
| 30 | == Source == |
| 31 | |
| 32 | You can check out ProtectedMacro from [http://trac-hacks.org/svn/protectedmacro here] using Subversion, or [source:protectedmacro browse the source] with Trac. |
| 33 | |
| 34 | == Example == |
| 35 | |
| 36 | {{{ |
| 37 | {{{ |
| 38 | #!protected |
| 39 | This will only be visible to those that have PROTECTED_VIEW |
| 40 | Will show all content with a red line to the left |
| 41 | }}} |
| 42 | |
| 43 | {{{ |
| 44 | #!protected-red |
| 45 | This will only be visible to those that have PROTECTED_RED_VIEW |
| 46 | Will show all content with a red line to the left |
| 47 | }}} |
| 48 | |
| 49 | {{{ |
| 50 | #!protected-blue |
| 51 | This will only be visible to those that have PROTECTED_BLUE_VIEW |
| 52 | Will show all content with a blue line to the left |
| 53 | }}} |
| 54 | |
| 55 | {{{ |
| 56 | #!protected-green |
| 57 | This will only be visible to those that have PROTECTED_GREEN_VIEW |
| 58 | Will show all content with a green line to the left |
| 59 | }}} |
| 60 | }}} |
| 61 | |
| 62 | == Recent Changes == |
| 63 | |
| 64 | [[ChangeLog(protectedmacro, 3)]] |
| 65 | |
| 66 | == Author/Contributors == |
| 67 | |
| 68 | '''Author:''' [wiki:frayja] [[BR]] |
| 69 | '''Contributors:''' |