summaryrefslogtreecommitdiff
path: root/templates/role_form.pt
blob: 3a28c5070beaec5b2773b5b7179d2f7ac2e10123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="standard_template/macros/page">
<metal:fill fill-slot="body">

<p>Use this form to add or remove a user's Role for a Package. The
available Roles are defined as:
<dl><dt><b>Owner</b></dt><dd>
  Owns a package name, may assign Maintainer Role for that name.  The
  first user to register information about a package is deemed Owner
  of the package name.  The Admin user may change this if necessary.
  May submit updates for the package name.
  </dd>
<dt><b>Maintainer</b></dt><dd>
  Can submit and update info for a particular package name.
  </dd></dl>
        </p>
<p> </p>

<form tal:attributes="action app/url_path" method="POST">
<input type="hidden" name=":action" value="role" />
<table class="form">
<tr><th>User Name:</th>
    <td><input type="text" name="user_name" /></td>
</tr>

<tr tal:content="structure data/package" />

<tr><th>Role to Add:</th>
    <td><select name="role_name">
        <option value="Owner">Owner</option>
        <option value="Maintainer">Maintainer</option>
        <option tal:condition="python:app.store.has_role('Admin', None)"
            value="Admin">Admin</option>
        </select></td>
</tr>
<tr><td> </td>
    <td><input type="submit" name=":operation" value="Add Role" />
        <input type="submit" name=":operation" value="Remove Role" /></td></tr>
</table>
</form>

<tal:block replace="structure python:app.package_role_list(data['name'],
    'Existing Roles')" />

</metal:fill>
</html>