Fix #316: restrict access to /badges, remove link.

This commit is contained in:
TLSM 2022-09-12 00:00:56 -04:00 committed by Ben Rog-Wilhelm
parent c0e5aad357
commit 2d59865363
2 changed files with 2 additions and 2 deletions

View file

@ -387,7 +387,7 @@ def robots_txt():
return f return f
@app.get("/badges") @app.get("/badges")
@auth_required @admin_level_required(2)
@cache.memoize(timeout=3600, make_name=make_name) @cache.memoize(timeout=3600, make_name=make_name)
def badges(v): def badges(v):
badges = g.db.query(BadgeDef).order_by(BadgeDef.id).all() badges = g.db.query(BadgeDef).order_by(BadgeDef.id).all()

View file

@ -209,7 +209,7 @@
</div> </div>
<div class="text-small-extra text-muted mt-3">Share this link with a friend. {% if v.referral_count==0 %} When they sign up, you'll get the bronze recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<10 %} When you refer 10 friends, you'll receive the silver recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<100 %} When you refer 100 friends, you'll receive the gold recruitment badge. <a href="/badges">Learn more</a>.{% endif %}</div> <div class="text-small-extra text-muted mt-3">Share this link with a friend. {% if v.referral_count==0 %} When they sign up, you'll get the bronze recruitment badge.{% elif v.referral_count<10 %} When you refer 10 friends, you'll receive the silver recruitment badge.{% elif v.referral_count<100 %} When you refer 100 friends, you'll receive the gold recruitment badge.{% endif %}</div>
</div> </div>