Phase 10, part 5: access enforced on every page, form and fragment
One table maps every address to an area (a module, Settings, anything signed in, or public); each route is checked against it, and the app won't start with a route missing from it. Changing needs edit on the module. For members who may only view, forms that would change something are shown disabled and htmx buttons hidden. The menu, the Overview, Search and the SEO emails follow each person's modules; Settings is for admins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,12 @@
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{if .Pending}}
|
||||
{{if not .Modules}}
|
||||
<section class="card empty"><p>You don't have any modules yet. An admin can give you some, under Settings → Users.</p></section>
|
||||
{{end}}
|
||||
|
||||
{{if not .Admin}}
|
||||
{{else if .Pending}}
|
||||
<section class="card">
|
||||
<h2>Setup</h2>
|
||||
<ul class="steps">
|
||||
@@ -45,7 +50,8 @@
|
||||
</details>
|
||||
{{end}}
|
||||
|
||||
{{if .ImportErr}}
|
||||
{{if not .Admin}}
|
||||
{{else if .ImportErr}}
|
||||
<section class="card warn">
|
||||
<h2>Import from the old app failed</h2>
|
||||
<p>{{.ImportErr}}</p>
|
||||
|
||||
Reference in New Issue
Block a user