Phase 13, part 8: a team's data is theirs
The owner exports everything from Settings → Your data (the keys only with their password), and can delete the team: it closes at once, everyone in it is told, it can be undone for 30 days, and then its schema, files, agents and memberships go for good. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{{define "content"}}{{template "settings-start" .}}{{with .Data}}
|
||||
<h2>Your data</h2>
|
||||
<p class="lede">Everything in Supermarket is yours to take with you: an export holds every table's rows, readable by <code>supermarket import</code> into any Supermarket.</p>
|
||||
{{with .Problem}}<p class="error" role="alert">{{.}}</p>{{end}}
|
||||
<form class="card" method="post" action="/settings/data/export">
|
||||
<h3>Export everything</h3>
|
||||
<p class="help">The keys and tokens (social sign-ins, API keys) are left out, unless you ask for them, which needs your password: then keep the file as safe as they are.</p>
|
||||
<label class="check small"><input type="checkbox" name="with_secrets"> Include the keys and tokens</label>
|
||||
<label class="small">Your password <span class="muted">(only with the keys)</span> <input type="password" name="password" autocomplete="current-password"></label>
|
||||
<button type="submit" data-busy="Exporting…">Export</button>
|
||||
</form>
|
||||
{{if .Exports}}
|
||||
<section class="card">
|
||||
<table class="list"><thead><tr><th>Export</th><th class="num">Size</th><th>Made</th><th></th></tr></thead>
|
||||
<tbody>{{range .Exports}}<tr>
|
||||
<td><a href="/settings/data/exports/{{slice .Key 8}}">{{slice .Key 8}}</a></td><td class="num">{{bytes .Size}}</td><td>{{ago .Modified}}</td>
|
||||
<td><form class="inline" method="post" action="/settings/data/exports/{{slice .Key 8}}/delete"><button type="submit" class="secondary small">Delete</button></form></td>
|
||||
</tr>{{end}}</tbody></table>
|
||||
</section>
|
||||
{{end}}
|
||||
{{if .Multi}}{{with .Team}}
|
||||
<form class="card danger-zone" method="post" action="/settings/data/delete-team" data-confirm="Delete {{.Name}}? Everyone in it is told, and you have 30 days to undo it.">
|
||||
<h3>Delete the team</h3>
|
||||
<p>The team closes at once; everyone in it ({{$.Data.Members}}) gets an email. For 30 days you can undo it; then its data and files go for good. Export first, if you want to keep anything.</p>
|
||||
<label class="small">Type the team's name, <strong>{{.Name}}</strong> <input name="confirm" required></label>
|
||||
<label class="small">Your password <input type="password" name="password" autocomplete="current-password" required></label>
|
||||
<button type="submit" class="danger">Delete {{.Name}}</button>
|
||||
</form>
|
||||
{{end}}{{end}}
|
||||
{{end}}{{template "settings-end"}}{{end}}
|
||||
@@ -170,6 +170,7 @@
|
||||
<div class="nav-label">Data</div>
|
||||
<a href="/settings/backups" {{if eq .Nav "settings/backups"}}aria-current="page"{{end}}>{{template "icon" "backups"}}Backups</a>
|
||||
<a href="/settings/activity" {{if eq .Nav "settings/activity"}}aria-current="page"{{end}}>{{template "icon" "backups"}}Activity</a>
|
||||
{{with $.Viewer}}{{if and .User (eq (print .Member.Role) "owner")}}<a href="/settings/data" {{if eq $.Nav "settings/data"}}aria-current="page"{{end}}>{{template "icon" "backups"}}Your data</a>{{end}}{{end}}
|
||||
<a href="/settings/about" {{if eq .Nav "settings/about"}}aria-current="page"{{end}}>{{template "icon" "info"}}About</a>
|
||||
{{end}}
|
||||
</nav>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<h1>{{.Name}} is {{.Status}}</h1>
|
||||
<section class="card">
|
||||
{{if eq .Status "suspended"}}<p>The people running Supermarket have suspended this team. Its data is kept, and its work waits. Ask them why, or for it to be restored.</p>
|
||||
{{else}}<p>This team is being deleted. Its owner can still undo it, until {{.DeleteAt.Local.Format "2 Jan 2006"}}.</p>{{end}}
|
||||
{{else}}<p>This team is being deleted. Its owner can still undo it, until {{.DeleteAt.Local.Format "2 Jan 2006"}}.</p>
|
||||
{{with $.Viewer}}{{if eq (print .Member.Role) "owner"}}<form method="post" action="/teams/undelete"><button type="submit">Undo: keep the team</button></form>{{end}}{{end}}{{end}}
|
||||
<p><a href="/settings/account">Your account</a> · <form class="inline" method="post" action="/signout"><button type="submit" class="secondary small">Sign out</button></form></p>
|
||||
</section>
|
||||
{{end}}{{end}}
|
||||
|
||||
Reference in New Issue
Block a user