feat: per-organization limits set by platform admins
Admins set default limits for monitors (all types), status pages and regions per monitor, whether an organization's own checker regions count towards the region limit, and how many organizations an account may own, and override them per organization or account. Defaults are not copied: changing one applies at once to everyone without an override. 0 means unlimited; self-hosted defaults are unlimited, the cloud allows three organizations per account. Creations count under a per-organization advisory lock, so concurrent requests cannot overshoot. A lowered limit keeps everything that exists: monitors already beyond the region limit stay editable but may not grow. Organizations see their usage in their settings and GET /org/limits; the admin panel lists organizations with owner, usage and limits next to their suspend and delete actions. Empty numeric form fields marked data-nullable are sent as null. Refs #111 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
90e74d091a
commit
e4ce619fbe
26 files changed
+2386
-82
No files matched your search
@@ -170,6 +170,7 @@ func TestDynamicFamilies(t *testing.T) {
|
||||
"moderation.target_": {"page", "org", "owner"},
|
||||
"moderation.delete_": {"page", "org", "owner"},
|
||||
"moderation.delete_confirm_": {"page", "org", "owner"},
|
||||
"limits.own_": {"true", "false"},
|
||||
"weekday.": {"0", "1", "2", "3", "4", "5", "6"},
|
||||
"md.": {"heading", "bold", "italic", "strike", "link", "ul", "ol", "quote", "code", "codeblock", "table", "hr"},
|
||||
"maintenance.recurrence_": {"none", "daily", "weekly", "monthly"},
|
||||
|
||||
@@ -97,13 +97,16 @@
|
||||
"audit.action.platform.check_types_update": "Check-Typen geändert",
|
||||
"audit.action.platform.checker_network_update": "Checker-Netzwerk geändert",
|
||||
"audit.action.platform.legal_update": "Rechtstext der Plattform geändert",
|
||||
"audit.action.platform.limits_update": "Standard-Limits geändert",
|
||||
"audit.action.platform.org_delete": "Organisation durch Admin gelöscht",
|
||||
"audit.action.platform.org_limits_update": "Limits einer Organisation geändert",
|
||||
"audit.action.platform.org_suspension": "Organisation gesperrt oder entsperrt",
|
||||
"audit.action.platform.region_create": "Plattform-Region erstellt",
|
||||
"audit.action.platform.region_delete": "Plattform-Region gelöscht",
|
||||
"audit.action.platform.status_page_delete": "Statusseite durch Admin gelöscht",
|
||||
"audit.action.platform.status_page_suspension": "Statusseite gesperrt oder entsperrt",
|
||||
"audit.action.platform.user_delete": "Account durch Admin gelöscht",
|
||||
"audit.action.platform.user_limits_update": "Limits eines Accounts geändert",
|
||||
"audit.action.platform.user_suspension": "Account gesperrt oder entsperrt",
|
||||
"audit.action.region.create": "Region erstellt",
|
||||
"audit.action.region.delete": "Region gelöscht",
|
||||
@@ -529,6 +532,7 @@
|
||||
"error.maintenance_overlaps": "Die Wartung würde länger dauern als der Abstand bis zur Wiederholung.",
|
||||
"error.maintenance_without_targets": "Wähle mindestens einen Monitor oder eine Gruppe.",
|
||||
"error.mfa_expired": "Anmeldung abgelaufen, bitte erneut anmelden.",
|
||||
"error.monitor_limit": "Deine Organisation hat ihr Limit von {{.Max}} Monitoren erreicht.",
|
||||
"error.no_domain": "Lege zuerst eine eigene Domain fest.",
|
||||
"error.no_password": "Konto ohne Passwort.",
|
||||
"error.not_found": "Nicht gefunden.",
|
||||
@@ -539,10 +543,12 @@
|
||||
"error.owns_shared_orgs": "Du besitzt Organisationen mit weiteren Mitgliedern. Übergib oder lösche sie zuerst.",
|
||||
"error.password_too_short": "Das Passwort braucht mindestens {{.Min}} Zeichen.",
|
||||
"error.permission_escalation": "Du kannst keine Berechtigungen vergeben, die du selbst nicht hast.",
|
||||
"error.platform_region_limit": "Ein Monitor darf aus höchstens {{.Max}} Plattform-Regionen geprüft werden; eigene Checker-Regionen zählen nicht.",
|
||||
"error.policy_would_lock_you_out": "Deine aktuelle Anmeldung erfüllt diese Richtlinie nicht. Erfülle sie zuerst und aktiviere sie dann.",
|
||||
"error.rate_limited": "Zu viele Versuche, bitte später erneut.",
|
||||
"error.region_in_use": "Die Region wird noch von Monitoren oder Agents genutzt.",
|
||||
"error.region_key_taken": "Eine Region mit diesem Schlüssel gibt es bereits.",
|
||||
"error.region_limit": "Ein Monitor darf aus höchstens {{.Max}} Regionen geprüft werden.",
|
||||
"error.role_built_in": "Eingebaute Rollen können nicht geändert werden.",
|
||||
"error.role_in_use": "Die Rolle ist noch Mitgliedern zugewiesen.",
|
||||
"error.role_name_taken": "Eine Rolle mit diesem Namen gibt es bereits.",
|
||||
@@ -563,6 +569,7 @@
|
||||
"error.sso_provider_error": "Der Identity Provider konnte die Anmeldung nicht abschließen.",
|
||||
"error.sso_required_by_org": "Diese Organisation verlangt die Anmeldung über ihren SSO-Provider.",
|
||||
"error.sso_unavailable": "Für diese Organisation ist kein Single Sign-on verfügbar.",
|
||||
"error.status_page_limit": "Deine Organisation hat ihr Limit von {{.Max}} Statusseiten erreicht.",
|
||||
"error.target_is_admin": "Plattform-Admins können hier nicht gesperrt oder gelöscht werden.",
|
||||
"error.token_lifetime_exceeds_policy": {
|
||||
"one": "Tokens in dieser Organisation müssen innerhalb von {{.Count}} Tag ablaufen.",
|
||||
@@ -744,6 +751,20 @@
|
||||
"legal.platform_title": "Impressum & Datenschutz der Plattform",
|
||||
"legal.privacy": "Datenschutz",
|
||||
"legal.url": "Link auf eine bestehende Seite",
|
||||
"limits.default": "Standard: {{.Value}}",
|
||||
"limits.intro": "Gelten für jede Organisation und jeden Account ohne eigenen Wert, auch wenn du sie später änderst. 0 heißt unbegrenzt. Ein gesenktes Limit lässt alles Bestehende stehen; nur neue Monitore, Statusseiten, Regionen oder Organisationen werden abgelehnt.",
|
||||
"limits.monitors": "Monitore",
|
||||
"limits.org_title": "Kontingent",
|
||||
"limits.orgs_per_account": "Organisationen pro Account",
|
||||
"limits.own_false": "zählen nicht",
|
||||
"limits.own_regions_count": "Eigene Checker-Regionen zählen zum Regionen-Limit",
|
||||
"limits.own_regions_count_hint": "Aus: Organisationen dürfen beliebig viele eigene Regionen nutzen; begrenzt werden nur Plattform-Regionen.",
|
||||
"limits.own_regions_free": "Eigene Checker-Regionen zählen nicht zum Regionen-Limit.",
|
||||
"limits.own_true": "zählen",
|
||||
"limits.regions_per_monitor": "Regionen pro Monitor",
|
||||
"limits.status_pages": "Statusseiten",
|
||||
"limits.title": "Standard-Limits",
|
||||
"limits.unlimited": "unbegrenzt",
|
||||
"maintenance.delete_confirm": "Dieses Wartungsfenster samt Wiederholungen löschen?",
|
||||
"maintenance.edit": "Wartung bearbeiten",
|
||||
"maintenance.empty": "Keine Wartung geplant.",
|
||||
@@ -1011,6 +1032,13 @@
|
||||
"org.token_max_days": "Maximale Gültigkeit von API-Tokens (Tage)",
|
||||
"org.token_max_days_hint": "Neue Tokens müssen innerhalb dieses Zeitraums ablaufen. Beim Speichern werden bestehende Tokens gekürzt, die länger gelten würden. Leer lassen für keine Begrenzung.",
|
||||
"org.token_max_days_none": "unbegrenzt",
|
||||
"orgs.intro": "Alle Organisationen mit Inhaber, Nutzung und Limits. Ein leeres Limit folgt dem Standard.",
|
||||
"orgs.limits": "Limits dieser Organisation",
|
||||
"orgs.manage": "Limits, sperren oder löschen …",
|
||||
"orgs.none": "Keine Organisation gefunden.",
|
||||
"orgs.owner_orgs": "Organisationen, die der Inhaber besitzen darf (besitzt {{.Count}})",
|
||||
"orgs.search": "Name, Kürzel oder E-Mail des Inhabers",
|
||||
"orgs.title": "Organisationen",
|
||||
"page.component.degraded": "Eingeschränkt",
|
||||
"page.component.maintenance": "Wartung",
|
||||
"page.component.operational": "In Betrieb",
|
||||
|
||||
@@ -97,13 +97,16 @@
|
||||
"audit.action.platform.check_types_update": "Check types changed",
|
||||
"audit.action.platform.checker_network_update": "Checker network changed",
|
||||
"audit.action.platform.legal_update": "Platform legal document changed",
|
||||
"audit.action.platform.limits_update": "Default limits changed",
|
||||
"audit.action.platform.org_delete": "Organization deleted by admin",
|
||||
"audit.action.platform.org_limits_update": "Organization limits changed",
|
||||
"audit.action.platform.org_suspension": "Organization suspended or reinstated",
|
||||
"audit.action.platform.region_create": "Platform region created",
|
||||
"audit.action.platform.region_delete": "Platform region deleted",
|
||||
"audit.action.platform.status_page_delete": "Status page deleted by admin",
|
||||
"audit.action.platform.status_page_suspension": "Status page suspended or reinstated",
|
||||
"audit.action.platform.user_delete": "Account deleted by admin",
|
||||
"audit.action.platform.user_limits_update": "Account limits changed",
|
||||
"audit.action.platform.user_suspension": "Account suspended or reinstated",
|
||||
"audit.action.region.create": "Region created",
|
||||
"audit.action.region.delete": "Region deleted",
|
||||
@@ -529,6 +532,7 @@
|
||||
"error.maintenance_overlaps": "The maintenance would last longer than the time until it repeats.",
|
||||
"error.maintenance_without_targets": "Choose at least one monitor or group.",
|
||||
"error.mfa_expired": "Sign-in expired, please start again.",
|
||||
"error.monitor_limit": "Your organization has reached its limit of {{.Max}} monitors.",
|
||||
"error.no_domain": "Set a custom domain first.",
|
||||
"error.no_password": "This account has no password.",
|
||||
"error.not_found": "Not found.",
|
||||
@@ -539,10 +543,12 @@
|
||||
"error.owns_shared_orgs": "You own organizations with other members. Hand them over or delete them first.",
|
||||
"error.password_too_short": "The password needs at least {{.Min}} characters.",
|
||||
"error.permission_escalation": "You cannot grant permissions you do not hold yourself.",
|
||||
"error.platform_region_limit": "A monitor may be checked from at most {{.Max}} platform regions; your own checker regions do not count.",
|
||||
"error.policy_would_lock_you_out": "Your current sign-in does not meet this policy. Meet it first, then turn it on.",
|
||||
"error.rate_limited": "Too many attempts, please try again later.",
|
||||
"error.region_in_use": "The region is still used by monitors or agents.",
|
||||
"error.region_key_taken": "A region with this key already exists.",
|
||||
"error.region_limit": "A monitor may be checked from at most {{.Max}} regions.",
|
||||
"error.role_built_in": "Built-in roles cannot be changed.",
|
||||
"error.role_in_use": "The role is still assigned to members.",
|
||||
"error.role_name_taken": "A role with this name already exists.",
|
||||
@@ -563,6 +569,7 @@
|
||||
"error.sso_provider_error": "The identity provider could not complete the sign-in.",
|
||||
"error.sso_required_by_org": "This organization requires signing in through its SSO provider.",
|
||||
"error.sso_unavailable": "Single sign-on is not available for this organization.",
|
||||
"error.status_page_limit": "Your organization has reached its limit of {{.Max}} status pages.",
|
||||
"error.target_is_admin": "Platform admins cannot be suspended or deleted here.",
|
||||
"error.token_lifetime_exceeds_policy": {
|
||||
"one": "Tokens in this organization must expire within {{.Count}} day.",
|
||||
@@ -744,6 +751,20 @@
|
||||
"legal.platform_title": "Platform legal notice & privacy",
|
||||
"legal.privacy": "Privacy policy",
|
||||
"legal.url": "Link to an existing page",
|
||||
"limits.default": "default: {{.Value}}",
|
||||
"limits.intro": "Apply to every organization and account without an override of its own, also when you change them later. 0 means unlimited. Lowering a limit keeps everything that exists; only new monitors, status pages, regions or organizations are refused.",
|
||||
"limits.monitors": "Monitors",
|
||||
"limits.org_title": "Usage",
|
||||
"limits.orgs_per_account": "Organizations per account",
|
||||
"limits.own_false": "do not count",
|
||||
"limits.own_regions_count": "Own checker regions count towards the region limit",
|
||||
"limits.own_regions_count_hint": "Off: organizations may add as many of their own regions as they like; only platform regions are limited.",
|
||||
"limits.own_regions_free": "Your own checker regions do not count towards the region limit.",
|
||||
"limits.own_true": "count",
|
||||
"limits.regions_per_monitor": "Regions per monitor",
|
||||
"limits.status_pages": "Status pages",
|
||||
"limits.title": "Default limits",
|
||||
"limits.unlimited": "unlimited",
|
||||
"maintenance.delete_confirm": "Delete this maintenance window and all its repeats?",
|
||||
"maintenance.edit": "Edit maintenance",
|
||||
"maintenance.empty": "No maintenance planned.",
|
||||
@@ -1011,6 +1032,13 @@
|
||||
"org.token_max_days": "Maximum API token lifetime (days)",
|
||||
"org.token_max_days_hint": "New tokens must expire within this period. Saving shortens existing tokens that would outlive it. Leave empty for no limit.",
|
||||
"org.token_max_days_none": "unlimited",
|
||||
"orgs.intro": "All organizations with their owner, usage and limits. Leave a limit empty to follow the default.",
|
||||
"orgs.limits": "Limits of this organization",
|
||||
"orgs.manage": "Limits, suspend or delete …",
|
||||
"orgs.none": "No organization matches.",
|
||||
"orgs.owner_orgs": "Organizations the owner may own (owns {{.Count}})",
|
||||
"orgs.search": "Name, slug or owner email",
|
||||
"orgs.title": "Organizations",
|
||||
"page.component.degraded": "Degraded",
|
||||
"page.component.maintenance": "Maintenance",
|
||||
"page.component.operational": "Operational",
|
||||
|
||||
Reference in new issue
Block a user