feat(saas): Phase 3 — plan/seats/active model, ToS consent, signed expiring export
P3a: org carries plan/seats/active/created_at; create_user enforces seats + rejects inactive org; verify blocks login for inactive orgs; PATCH /api/admin/orgs (super_admin) updates plan/seats/active with audit. Fixed verify swallowing its AuthError. P3b: export/token issues a 5-min HMAC one-time CSV link; export accepts ?token=. P3c: setup requires accepted_terms (consent stored); Setup.vue consent checkbox. All 8 backend suites pass. Rebuilt dist.
This commit is contained in:
@@ -39,8 +39,8 @@ def main():
|
||||
assert r.status_code == 400, r.get_json()
|
||||
print("[ok] setup rejects bad email/short password")
|
||||
|
||||
# 3. Successful setup: email + new password, clears must_setup
|
||||
r = client.post("/api/auth/setup", json={"username": "admin", "email": "admin@corp.com", "password": "NewPass!42"}, headers=H)
|
||||
# 3. Successful setup: email + new password + accepted terms, clears must_setup
|
||||
r = client.post("/api/auth/setup", json={"username": "admin", "email": "admin@corp.com", "password": "NewPass!42", "accepted_terms": True}, headers=H)
|
||||
assert r.status_code == 200, r.get_json()
|
||||
assert r.get_json()["must_setup"] is False
|
||||
print("[ok] setup completes -> must_setup=false")
|
||||
|
||||
Reference in New Issue
Block a user