feat: add per-user customization suppression toggles and API endpoints for profile

This commit is contained in:
2026-06-09 20:52:51 +00:00
parent c2c5166720
commit a3f9b949ca
15 changed files with 495 additions and 19 deletions
@@ -131,4 +131,31 @@ CUSTOMIZATION_ACTIONS: tuple[Action, ...] = (
),
),
),
Action(
name="customize_set_enabled",
method="LOCAL",
path="",
summary="Show or suppress the user's customizations without deleting them",
description=(
"Toggles whether the user's saved customizations render, keeping the stored code intact. "
"category='global' controls the site-wide customizations; category='pagetype' controls every "
"per-page-type customization at once. enabled=false hides them; enabled=true shows them again. "
"Mirrors the toggle buttons on the user's profile page."
),
handler="customization",
requires_auth=True,
params=(
arg(
"category",
"Which set to toggle: 'global' (whole site) or 'pagetype' (all per-page customizations).",
required=True,
),
arg(
"enabled",
"true to show the customizations, false to suppress them.",
required=True,
kind="boolean",
),
),
),
)