Admin-only list of bounty entries that have a previewable image.
(limit: int = 120)
| 15623 | pin = request.form.get("pin") or "" |
| 15624 | try: |
| 15625 | _chat_lock_set(me, "group", gid, pin) |
| 15626 | flash("Group PIN saved.") |
| 15627 | except ValueError: |
| 15628 | flash("PIN must be 4 to 12 digits.") |
| 15629 | return redirect(url_for("group_chat", gid=gid)) |
| 15630 | |
| 15631 | |
| 15632 | @app.route("/groups/<int:gid>/lock/unlock", methods=["POST"]) |
| 15633 | @login_required |
| 15634 | def group_lock_unlock(gid: int): |
| 15635 | me = current_user() |
| 15636 | if not group_role(gid, me): |
| 15637 | abort(403) |
| 15638 | pin = request.form.get("pin") or "" |
| 15639 | if _chat_lock_verify_and_unlock(me, "group", gid, pin): |
| 15640 | flash("Group unlocked.") |
| 15641 | else: |
| 15642 | flash("Wrong PIN.") |
no test coverage detected