security: expose MXID change date to the admin panel
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
inference-admin committed 2026-11-19 23:44:10 +00:00
1 parent c57dbdb62e
commit 3a2d6088f2
1 file changed
+4 -3
+4 -3
View File
@@ -5411,8 +5411,8 @@ async def admin_overview(request: Request):
conn = get_db() conn = get_db()
rows = conn.execute( rows = conn.execute(
"SELECT email, active, balance, cloudron_user_id, org_slug, matrix_mxid, " "SELECT email, active, balance, cloudron_user_id, org_slug, matrix_mxid, "
"account_type, oc_email, guest_expires_at, dues_amount, dues_frequency, " "matrix_mxid_changed_at, account_type, oc_email, guest_expires_at, "
"dues_updated_at FROM members ORDER BY email" "dues_amount, dues_frequency, dues_updated_at FROM members ORDER BY email"
).fetchall() ).fetchall()
# Guest inviter/expiry from the guests ledger (latest row per recipient) — # Guest inviter/expiry from the guests ledger (latest row per recipient) —
# the abuse-protection context the panel shows on the guest pill, plus the # the abuse-protection context the panel shows on the guest pill, plus the
@@ -5496,7 +5496,7 @@ async def admin_overview(request: Request):
operator_all_time = 0.0 operator_all_time = 0.0
guest_spend = 0.0 guest_spend = 0.0
guest_all_time = 0.0 guest_all_time = 0.0
for email, active, balance, user_id, org_slug, matrix_mxid, acct_type, oc_email, guest_exp, dues_amount, dues_freq, dues_updated in rows: for email, active, balance, user_id, org_slug, matrix_mxid, mxid_changed_at, acct_type, oc_email, guest_exp, dues_amount, dues_freq, dues_updated in rows:
team = teams.get(f"member:{email}", {}) team = teams.get(f"member:{email}", {})
spend = float(team.get("spend") or 0.0) spend = float(team.get("spend") or 0.0)
member_all_time = float(all_time_spend.get(f"member:{email}", 0.0)) member_all_time = float(all_time_spend.get(f"member:{email}", 0.0))
@@ -5541,6 +5541,7 @@ async def admin_overview(request: Request):
"source": member_source(email), "source": member_source(email),
"org": org_slug or None, "org": org_slug or None,
"matrix_mxid": matrix_mxid or None, "matrix_mxid": matrix_mxid or None,
"matrix_mxid_changed_at": mxid_changed_at or None,
"balance": float(balance) if balance is not None else MEMBER_BUDGET, "balance": float(balance) if balance is not None else MEMBER_BUDGET,
"credit_balance": credits, "credit_balance": credits,
"credits_remaining": max(0.0, credits - eff["credits_used"]), "credits_remaining": max(0.0, credits - eff["credits_used"]),