MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / report_delete

Function report_delete

Scripts/ButSystem.py:17606–17622  ·  view source on GitHub ↗
(rid: int)

Source from the content-addressed store, hash-verified

17604 conn.execute("INSERT OR IGNORE INTO users(username, pw_hash, is_admin, created_at) VALUES(?,?,0,?)",
17605 (row["username"], row["pw_hash"], now_z()))
17606 conn.execute("UPDATE pending_users SET status='approved' WHERE username=?", (username,))
17607 conn.commit()
17608 user_root(username)
17609 ensure_profile_row(username)
17610 try:
17611 set_profile(username, username, "", [])
17612 except Exception:
17613 pass
17614 sys.stdout.write(f"[ButSystem] Approved: {username}\n")
17615 else:
17616 conn.execute("UPDATE pending_users SET status='denied' WHERE username=?", (username,))
17617 conn.commit()
17618 sys.stdout.write(f"[ButSystem] Denied: {username}\n")
17619 sys.stdout.flush()
17620 conn.close()
17621 except Exception as e:
17622 log.exception("Approval prompt error: %s", e)
17623 try:
17624 sys.stdout.write("[ButSystem] Approval error (see logs).\n")
17625 sys.stdout.flush()

Callers

nothing calls this directly

Calls 4

_feature_tables_initFunction · 0.70
user_is_adminFunction · 0.70
current_userFunction · 0.70
db_connectFunction · 0.70

Tested by

no test coverage detected