PageRenderTime 27ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

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