Phase 10, part 4: inviting users, and what admins can change
Settings → Users lists everyone with their access and status. Admins invite people by email (a link for 7 days), as admins or as members with modules each to view or edit; the invitation's page sets the password, profile and emails wanted. Admins can resend or withdraw invitations, change access, turn accounts off and on, unlock, reset two-factor, sign someone out, and remove them; never the owner, nor themselves. Your account gets the emails wanted and a photo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{{define "content"}}{{template "settings-start" .}}{{with .Data}}{{$d := .}}
|
||||
<h2>Users</h2>
|
||||
<p class="lede">Who can sign in, and to what. Admins can do everything, including this page; members get the modules you give them, each to view or to edit.</p>
|
||||
|
||||
<section class="card">
|
||||
<table class="list">
|
||||
<thead><tr><th>Name</th><th>Access</th><th>Status</th><th>Last signed in</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Rows}}<tr>
|
||||
<td><a href="/settings/users/{{.ID}}">{{if .Name}}{{.Name}}{{else}}{{.Email}}{{end}}</a>{{if eq .ID $d.Me}} <span class="muted">(you)</span>{{end}}<br><span class="muted small">{{.Email}}</span></td>
|
||||
<td>{{.Access}}</td>
|
||||
<td>{{template "user-status" .}}</td>
|
||||
<td>{{ago .SignedIn}}</td>
|
||||
</tr>{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<form class="card" method="post" action="/settings/users" id="invite">
|
||||
<h2>Invite someone</h2>
|
||||
{{with .Form.Problem}}<p class="error" role="alert">{{.}}</p>{{end}}
|
||||
<div class="cols">
|
||||
<label>Email address <input type="email" name="email" value="{{.Form.Email}}" required></label>
|
||||
<label>Name <input name="name" value="{{.Form.Name}}" required></label>
|
||||
</div>
|
||||
{{template "access-fields" (dict "Role" .Form.Role "Modules" .Form.Modules "Grants" .Grants)}}
|
||||
<p class="help">They get an email with a link that works once, for 7 days, to choose a password and fill in their profile.</p>
|
||||
<button type="submit">Send the invitation</button>
|
||||
</form>
|
||||
{{end}}{{template "settings-end"}}{{end}}
|
||||
|
||||
Reference in New Issue
Block a user