fix: add subscription_overage_percent to SETTING_METADATA and docs

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-06 21:29:44 +00:00
parent 45949f34c6
commit 9853a27d82
3 changed files with 29 additions and 0 deletions
+6
View File
@@ -141,6 +141,12 @@ UNOWNED_DOCS_VISIBLE_TO_ALL=true
# Leave empty/unset to keep them unowned until claimed.
# DEFAULT_OWNER_ID=
# **Subscription / Quota Settings**
# Soft-limit overage buffer in percent (0200). Announced quota is multiplied by (1 + percent/100)
# for actual enforcement. E.g. 20 means a 150-doc/month plan enforces at 180. 0 = enforce exactly.
# Per-plan overage_percent set in the Plan Designer overrides this global default.
# SUBSCRIPTION_OVERAGE_PERCENT=20
# **OpenID Connect/Authentik Settings**
AUTHENTIK_CLIENT_ID=<yourAuthentikAppClientID>
AUTHENTIK_CLIENT_SECRET=<yourAuthentikClientSecret>
+13
View File
@@ -1771,6 +1771,19 @@ SETTING_METADATA = {
"required": False,
"restart_required": True,
},
"subscription_overage_percent": {
"category": "Subscriptions",
"description": (
"Soft-limit overage buffer in percent (0200). The announced monthly quota is increased by this "
"percentage for actual enforcement. For example, 20 means a 150-doc/month plan enforces at 180 docs "
"(150 × 1.20). Set to 0 to enforce exactly at the announced limit. Per-plan overage_percent configured "
"in the Plan Designer overrides this global default. Default: 20."
),
"type": "integer",
"sensitive": False,
"required": False,
"restart_required": False,
},
}
+10
View File
@@ -195,6 +195,16 @@ Admins can assign ownership of documents to any user:
The `DEFAULT_OWNER_ID` setting can also be configured via the Settings page, which provides an
autocomplete field that searches existing users by substring.
### Subscriptions & Upload Quotas
DocuElevate supports configurable subscription plans with per-user upload quotas enforced at upload time.
Plans are managed via the **Plan Designer** at `/admin/plans`. The following global setting controls the
default overage buffer applied across all plans.
| **Variable** | **Description** | **Default** |
|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
| `SUBSCRIPTION_OVERAGE_PERCENT` | Soft-limit overage buffer in percent (0200). The announced monthly quota is multiplied by `(1 + percent/100)` for actual enforcement. E.g. `20` means a 150-doc/month plan enforces at 180 docs (150 × 1.20). Set `0` to enforce exactly at the announced limit. Per-plan `overage_percent` configured in the Plan Designer overrides this global default. | `20` |
### Security Headers
DocuElevate supports HTTP security headers to improve browser-side security. **These headers are disabled by default** since most deployments use a reverse proxy (Traefik, Nginx, etc.) that already adds them. Enable only if deploying directly without a reverse proxy. See [Deployment Guide - Security Headers](DeploymentGuide.md#security-headers) for detailed configuration examples.