feat!: remove the shared demo account
The demo account — one shared user that whitelisted emails entered from the login page, reset on a schedule — goes end to end (owner decision, E34): demo.py and the reset job, users.is_demo and demo_whitelist (migration 0098 deletes the demo user, its audit rows, the reset job's override and notices, then drops the column and table; the downgrade restores the empty schema), the /auth/demo entry, the admin whitelist and reset, the Demo tab, the banner, the login page's "Try the demo", and every is_demo branch in routes, userscope, scheduler and the UI. require_human only ever refused the demo account, so its 87 uses become current_user (owner-approved); require_write_scope keeps its own check. The login page's "or" divider now shows only beside the Google button: without the demo entry under it, an instance without Google would have said "or" to nothing. A contract test (removedFeatures) fails on the word anywhere in the backend, frontend, e2e or scripts — seen red on a planted hit. Size ceilings tightened for the modules that shrank; admin.py is back under the limit.
This commit is contained in:
+2
-3
@@ -4,7 +4,7 @@ Run INSIDE the api container — it needs the app's models + the argon2 hasher:
|
||||
|
||||
docker exec -i siftlode-api-1 python - < scripts/e2e_seed.py
|
||||
|
||||
Resets a dedicated, NON-demo test account to a known baseline every run, so the Playwright
|
||||
Resets a dedicated test account to a known baseline every run, so the Playwright
|
||||
golden-master net is deterministic and never touches a real account. Self-healing: a crashed
|
||||
spec that left the account dirty is cleaned on the next run. Prints one JSON line describing
|
||||
what it seeded (the wrapper / global-setup reads it).
|
||||
@@ -68,7 +68,7 @@ def main() -> None:
|
||||
db.commit()
|
||||
|
||||
# 1. Upsert the account and always reset it to a clean, loginable baseline
|
||||
# (email_verified + is_active + not suspended + not demo + password set).
|
||||
# (email_verified + is_active + not suspended + password set).
|
||||
user = db.scalar(select(User).where(User.email == EMAIL))
|
||||
if user is None:
|
||||
user = User(email=EMAIL)
|
||||
@@ -77,7 +77,6 @@ def main() -> None:
|
||||
user.email_verified = True
|
||||
user.is_active = True
|
||||
user.is_suspended = False
|
||||
user.is_demo = False
|
||||
user.google_sub = None
|
||||
# Admin so the E2E can reach the admin-only pages (scheduler / config / users / audit) and
|
||||
# thus the render ternary's admin branches — the primary real user (npeter83) is admin too.
|
||||
|
||||
Reference in New Issue
Block a user