feat(api): organization-owned regions, checkers and status page servers
Organizations create regions and agents for themselves under Regions & checkers; an org checker only receives its org's monitors. Platform admins manage shared regions and agents in the admin panel or with the CLI, which gains 'api admin grant|revoke'. The first user of a self-hosted installation becomes a platform admin. Region lists show the org's own regions first. Closes #52 Refs #29 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
607798d742
commit
22f0740056
19 files changed
+1932
-301
No files matched your search
@@ -19,6 +19,8 @@ type Me struct {
|
||||
Policy string
|
||||
// RecoveryCodesLeft counts unused TOTP recovery codes.
|
||||
RecoveryCodesLeft int
|
||||
// IsAdmin marks platform admins.
|
||||
IsAdmin bool
|
||||
}
|
||||
|
||||
// Org is one entry of the organization switcher.
|
||||
@@ -52,10 +54,14 @@ templ consoleShell(p Page, me Me) {
|
||||
<a href="/settings/tokens" class="text-muted hover:text-ink">{ i18n.T(ctx, "console.nav.tokens") }</a>
|
||||
}
|
||||
if me.Can["org.manage"] {
|
||||
<a href="/settings/regions" class="text-muted hover:text-ink">{ i18n.T(ctx, "console.nav.regions") }</a>
|
||||
<a href="/settings/org" class="text-muted hover:text-ink">{ i18n.T(ctx, "console.nav.org") }</a>
|
||||
<a href="/settings/sso" class="text-muted hover:text-ink">{ i18n.T(ctx, "console.nav.sso") }</a>
|
||||
}
|
||||
<a href="/settings/security" class="text-muted hover:text-ink">{ i18n.T(ctx, "console.nav.security") }</a>
|
||||
if me.IsAdmin {
|
||||
<a href="/admin" class="font-medium hover:underline">{ i18n.T(ctx, "console.nav.admin") }</a>
|
||||
}
|
||||
<button data-logout class="text-muted hover:text-ink">{ i18n.T(ctx, "console.nav.logout") }</button>
|
||||
@languageSwitch(p.Languages)
|
||||
</nav>
|
||||
|
||||
Reference in new issue
Block a user