Gate blocked actions behind an in-place terms acceptance dialog
A member whose account has not accepted the terms in force now gets one dialog on the action they attempted instead of a dead-end refusal. The client handler is the single TermsGate, wired into every Http POST helper so the four optimistic controllers cannot swallow the gate into an error flash, and the original request is replayed once the acceptance is recorded. Reading the site and deleting an account stay unblocked. apple.md is the source brief the compliance research documents reference. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ from devplacepy.utils import clear_user_cache, require_user
|
||||
logger = logging.getLogger(__name__)
|
||||
router = APIRouter()
|
||||
|
||||
TERMS_ACCEPTANCE_CODE = "terms_acceptance_required"
|
||||
|
||||
|
||||
def current_terms_version() -> str:
|
||||
return get_setting("terms_version", "1") or "1"
|
||||
|
||||
Reference in New Issue
Block a user