File: user.ejs

package info (click to toggle)
rabbitmq-server 2.8.4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,928 kB
  • sloc: erlang: 52,968; python: 2,846; xml: 1,987; sh: 816; makefile: 683; perl: 86; ruby: 63
file content (84 lines) | stat: -rw-r--r-- 2,722 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<h1>User: <b><%= fmt_string(user.name) %></b></h1>

<% if (permissions.length == 0) { %>
<p class="warning">
  This user does not have permission to access any virtual hosts.<br/>
  Use "Set Permission" below to grant permission to access virtual hosts.
</p>
<% } %>

<div class="section">
  <h2>Overview</h2>
  <div class="hider">
<table class="facts">
  <tr>
    <th>Tags</th>
    <td><%= fmt_string(user.tags) %></td>
  </tr>
  <tr>
    <th>Can log in with password</th>
    <td><%= fmt_boolean(user.password_hash.length > 0) %></td>
  </tr>
</table>
  </div>
</div>

<%= format('permissions', {'mode': 'user', 'permissions': permissions, 'vhosts': vhosts, 'parent': user}) %>

<div class="section-hidden">
  <h2>Update this user</h2>
  <div class="hider">
    <form action="#/users-modify" method="put">
      <input type="hidden" name="username" value="<%= fmt_string(user.name) %>"/>
      <table class="form">
        <tr>
          <th>
            <label>
              <select name="has-password" class="narrow controls-appearance" controls-divs="password" param-name="password">
                <option value="true">Password:</option>
                <option value="false">No password</option>
              </select>
            </label>
          </th>
          <td>
            <div id="password-yes">
              <input type="password" name="password" />
              <span class="mand">*</span><br/>
              <input type="password" name="password_confirm" />
              <span class="mand">*</span>
              (confirm)
            </div>
            <div id="password-no" style="display: none;">
              User cannot log in using password.
            </div>
          </td>
        </tr>
        <tr>
          <th><label>Tags:</label></th>
          <td>
            <input type="text" name="tags" id="tags" value="<%= fmt_string(user.tags) %>" />
            <span class="help" id="user-tags"/>
            <sub>
              [<a href="javascript:void($('#tags').val('administrator'));">Admin</a>]
              [<a href="javascript:void($('#tags').val('monitoring'));">Monitoring</a>]
              [<a href="javascript:void($('#tags').val('management'));">Management</a>]
              [<a href="javascript:void($('#tags').val(''));">None</a>]
            </sub>
          </td>
        </tr>
      </table>
      <input type="submit" value="Update user"/>
    </form>
  </div>
</div>


<div class="section-hidden">
  <h2>Delete this user</h2>
  <div class="hider">
    <form action="#/users" method="delete" class="confirm">
      <input type="hidden" name="username" value="<%= fmt_string(user.name) %>"/>
      <input type="submit" value="Delete"/>
    </form>
  </div>
</div>