Return the best available image source for a bounty profiler entry. This is for manual side-by-side review only. It does not perform any biometric comparison or matching.
(eid: int)
| 15576 | try: |
| 15577 | _chat_lock_set(me, "dm", username, pin) |
| 15578 | flash("Chat PIN saved.") |
| 15579 | except ValueError: |
| 15580 | flash("PIN must be 4 to 12 digits.") |
| 15581 | return redirect(url_for("chat_with", username=username)) |
| 15582 | |
| 15583 | |
| 15584 | @app.route("/chat/<username>/lock/unlock", methods=["POST"]) |
| 15585 | @login_required |
| 15586 | def dm_lock_unlock(username: str): |
| 15587 | me = current_user() |
| 15588 | username = (username or "").strip() |
| 15589 | pin = request.form.get("pin") or "" |
| 15590 | if _chat_lock_verify_and_unlock(me, "dm", username, pin): |
| 15591 | flash("Chat unlocked.") |
| 15592 | else: |
| 15593 | flash("Wrong PIN.") |
| 15594 | return redirect(url_for("chat_with", username=username)) |
| 15595 | |
| 15596 | |
| 15597 | @app.route("/chat/<username>/lock/remove", methods=["POST"]) |
| 15598 | @login_required |
| 15599 | def dm_lock_remove(username: str): |
| 15600 | me = current_user() |
| 15601 | username = (username or "").strip() |
| 15602 | _chat_lock_remove(me, "dm", username) |
| 15603 | flash("Chat PIN removed.") |
| 15604 | return redirect(url_for("chat_with", username=username)) |
| 15605 | |
| 15606 | |
| 15607 | @app.route("/chat/<username>/lock/close", methods=["POST"]) |
| 15608 | @login_required |
| 15609 | def dm_lock_close(username: str): |
| 15610 | me = current_user() |
| 15611 | username = (username or "").strip() |
| 15612 | _chat_lock_clear_session(me, "dm", username) |
| 15613 | flash("Chat locked.") |
| 15614 | return redirect(url_for("chat_with", username=username)) |
| 15615 | |
| 15616 | |
| 15617 | @app.route("/groups/<int:gid>/lock/set", methods=["POST"]) |
| 15618 | @login_required |
| 15619 | def group_lock_set(gid: int): |
| 15620 | me = current_user() |
| 15621 | if not group_role(gid, me): |
| 15622 | abort(403) |
| 15623 | pin = request.form.get("pin") or "" |
| 15624 | try: |
| 15625 | _chat_lock_set(me, "group", gid, pin) |
no test coverage detected