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>Users</h1>
<div class="section">
<h2>All users</h2>
<div class="hider">
<table class="list">
<thead>
<tr>
<th><%= fmt_sort('Name', 'name') %></th>
<th><%= fmt_sort('Tags', 'tags') %></th>
<th>Can access virtual hosts</th>
<th>Has password</th>
</tr>
</thead>
<tbody>
<%
for (var i = 0; i < users.length; i++) {
var user = users[i];
%>
<tr<%= alt_rows(i)%>>
<td><%= link_user(user.name) %></td>
<td class="c"><%= fmt_string(user.tags) %></td>
<td class="c"><%= fmt_permissions(user, permissions, 'user', 'vhost',
'<p class="warning">No access</p>') %></td>
<td class="c"><%= fmt_boolean(user.password_hash.length > 0) %></td>
</tr>
<% } %>
</tbody>
</table>
<p><span class="help" id="internal-users-only"></span></p>
</div>
</div>
<div class="section-hidden">
<h2>Add a user</h2>
<div class="hider">
<form action="#/users-add" method="put">
<table class="form">
<tr>
<th><label>Username:</label></th>
<td>
<input type="text" name="username"/>
<span class="mand">*</span>
</td>
</tr>
<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" />
<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="Add user"/>
</form>
</div>
</div>
|