Echo Writes Code

administration.html

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
{% extends "_base.html" %}

{% block title %}Administration{% endblock %}

{% block content %}
<h1>Administration</h1>
<section>
  <header>
    <h2>User Accounts</h2>
    <button command="show-modal" commandfor="help-access-management">Help</button>
  </header>
  <dialog id="help-access-management" closedby="any">
    <h2>Help: User Accounts</h2>
    <p>
      This is the list of users that can log in to your Limetree instance. Each user has some subset
      of the following permissions:
    </p>
    <ul>
      <li>
        <code>conf</code>: This user can visit the administration screen, create and delete users,
        and adjust permissions.
      </li>
      <li>
        <code>edit</code>: This user can create, delete, and edit pages and tags.
      </li>
      <li>
        <code>read</code>: This user can read and search pages.
      </li>
      <li>
        <code>talk</code>: This user can post comments in comment sections, but cannot edit pages
        otherwise.
      </li>
    </ul>
    <p>
      The <code>anon</code> user's permissions are used for any visitor that hasn't logged in. It is
      recommended to leave these permissions as either just <code>read</code> (if you want to host a
      public resource like a blog or a fan wiki), or empty (if you want to host a private resource
      like an internal wiki).
    </p>
    <button command="close" commandfor="help-access-management">Close</button>
  </dialog>
  <table>
    <thead>
      <tr>
        <th>Username</th>
        <th>Permissions</th>
        <th>Actions</th>
      </tr>
    </thead>
    <tbody>
{% for user in administration.users %}
      <tr>
        <td><code>{{ user.name }}</code></td>
        <td>
          <ul class="inline-tags">
{% for permission in user.permissions %}
            <li>{{ permission }}</li>
{% endfor %}
          </ul>
        </td>
        <td>
          <button>Change Username</button>
          <button>Change Password</button>
          <button>Change Permissions</button>
        </td>
      </tr>
{% endfor %}
    </tbody>
  </table>
</section>

<aside>
  <nav id="sticky">
    <ul>
      <li><a href="/user/new">New User</a></li>
      <li><a href="/api/deauthenticate">Log Out</a></li>
    </ul>
  </nav>
</aside>
{% endblock %}