This repository has been archived by the owner. It is now read-only.
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (43 sloc) 1.53 KB
from aspen import Response
if not user.ADMIN:
raise Response(401 if user.ANON else 403)
unreviewed = website.db.all("""
SELECT username
, balance
, (SELECT SUM(amount) FROM current_payment_instructions WHERE participant_id = AS giving
, (SELECT COUNT(*) FROM current_payment_instructions WHERE participant_id = AND amount > 0) AS ngiving_to
FROM participants p
WHERE is_suspicious IS NULL
AND ( -- They have a payin/payout route set up.
FROM current_exchange_routes r
WHERE r.participant =
) > 0
AND giving > 0
AND NOT is_closed
ORDER BY claimed_time
title = _("Fraud Review Dashboard")
[---] text/html
<script src="{{ website.asset('vendors.js') }}"></script>
<script src="{{ website.asset('gratipay.js') }}"></script>
<script src="index.js"></script>
<link rel="stylesheet" type="text/css" href="index.css">
<h3>Unreviewed Accounts (N = {{ len(unreviewed) }})</h3>
{% for account in unreviewed %}
<tr data-username="{{ account.username }}">
<button class="good small selected">Good</button>
<button class="bad small">Bad</button>
<a href="/~{{ account.username }}/" target="drill-down">{{ account.username }}</a>
<td>${{ }}</td>
<td>{{ account.ngiving_to }}</td>
{% endfor %}
<iframe name="drill-down"></iframe>