/www/dsp/edit-page-access.dsp

http://github.com/cgay/wiki · Unknown · 96 lines · 89 code · 7 blank · 0 comment · 0 complexity · 40f610a560fb82632c1ff7bb000b1c7e MD5 · raw file

  1. <%dsp:include url="xhtml-start.dsp"/>
  2. <%dsp:taglib name="wiki"/>
  3. <head>
  4. <title>Dylan Wiki: <wiki:show-page-title/> -- access control</title>
  5. <%dsp:include url="meta.dsp"/>
  6. </head>
  7. <body>
  8. <%dsp:include url="header.dsp"/>
  9. <div id="midsection">
  10. <div id="navigation">
  11. <wiki:include-page title="Wiki Left Nav"/>
  12. </div>
  13. <%dsp:include url="options-menu.dsp"/>
  14. <div id="content">
  15. <dsp:show-page-notes/>
  16. <h2>Access Control for <a href="<wiki:base/>/page/view/<wiki:show-page-title/>"><wiki:show-page-title/></a></h2>
  17. <dsp:show-page-errors/>
  18. <dsp:show-page-notes/>
  19. <dsp:if test="can-view-content?">
  20. <dsp:then>
  21. <form action="<wiki:base/>/page/access/<wiki:show-page-title/>" method="post">
  22. <p>
  23. Enter user names, group names, or one of the three
  24. special targets: <em>owner</em> (i.e., page
  25. owner), <em>trusted</em> (i.e., must be logged in),
  26. or <em>anyone</em>. Enter one per line. Precede any
  27. rule with ! to deny access to that target.
  28. </p>
  29. <label id="owner-label" for="owner-input">Owner:</label>
  30. <dsp:comment>
  31. todo
  32. <dsp:input id="owner-input" type="text" name="owner" width="20"/>
  33. </dsp:comment>
  34. <input id="owner-input" type="text" name="owner-name" width="20"
  35. <dsp:if-error field-name='owner-name' text='class="invalid-input"'/>
  36. value="<dsp:get name='owner-name' context='request,page'/>"/>
  37. <dsp:show-field-errors field-name="owner-name"/>
  38. <p/>
  39. <table border="0">
  40. <tr>
  41. <td>
  42. <label for="view-content-input">View Content</label>
  43. <textarea id="view-content-input" name="view-content" cols="20" rows="6"
  44. <dsp:if-error field-name='view-content' text='class="invalid-input"'/>
  45. ><wiki:show-rules name="view-content"/></textarea>
  46. </td>
  47. <td>
  48. <label for="modify-content-input">Modify Content</label>
  49. <textarea id="modify-content-input" name="modify-content" cols="20" rows="6"
  50. <dsp:if-error field-name='modify-content' text='class="invalid-input"'/>
  51. ><wiki:show-rules name="modify-content"/></textarea>
  52. </td>
  53. <td>
  54. <label for="modify-acls-input">Modify ACLs</label>
  55. <textarea id="modify-acls-input" name="modify-acls" cols="20" rows="6"
  56. <dsp:if-error field-name='modify-acls' text='class="invalid-input"'/>
  57. ><wiki:show-rules name="modify-acls"/></textarea>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td colspan="3" align="left">
  62. <dsp:show-field-errors field-name="modify-content,modify-acls,view-content"/>
  63. </td>
  64. </tr>
  65. </table>
  66. <p/>
  67. <label id="comment-label" for="comment-input">Comment:</label>
  68. <input id="comment-input" type="text" name="comment" width="50"
  69. <dsp:if-error field-name='comment' text='class="invalid-input"'/>
  70. value="<dsp:get name='comment' context='request'/>"/>
  71. <dsp:show-field-errors field-name="comment"/>
  72. <p/>
  73. <input type="submit" value="Save" />
  74. </form>
  75. </dsp:then>
  76. <dsp:comment>
  77. For now if you don't have permission to modify the ACLs you can't see 'em either.
  78. Eventually maybe we just show them, or add a view-acls permission, though I'm
  79. not sure it's worth the trouble.
  80. </dsp:comment>
  81. <dsp:else>
  82. You do not have permission to view this page.
  83. </dsp:else>
  84. </dsp:if>
  85. </div>
  86. </div>
  87. <%dsp:include url="footer.dsp"/>
  88. </body>
  89. </html>