k_size. Internal helper function. This docstring was added automatically to improve maintainability. Args: e: Parameter. Returns: Varies.
(e)
| 11544 | |
| 11545 | conn = db_connect() |
| 11546 | row = conn.execute( |
| 11547 | "SELECT id, username, status, approved_by FROM device_access_requests WHERE device_fp=? ORDER BY id DESC LIMIT 1", |
| 11548 | (fp,) |
| 11549 | ).fetchone() |
| 11550 | conn.close() |
| 11551 | if not row: |
| 11552 | return jsonify({"ok": True, "status": "none", "logged_in": False}) |
| 11553 | |
| 11554 | status = row["status"] |
| 11555 | if status != "approved": |
| 11556 | return jsonify({"ok": True, "status": status, "logged_in": False}) |
| 11557 | |
| 11558 | username = row["username"] |
| 11559 | # If 2FA enabled, do not auto-login. |
| 11560 | if user_2fa_enabled(username): |
| 11561 | return jsonify({"ok": True, "status": "approved", "logged_in": False, "needs_login": True}) |
| 11562 |
nothing calls this directly
no outgoing calls
no test coverage detected