banned community

This commit is contained in:
rimu 2024-02-14 15:55:45 +13:00
parent 2bf1aa23ee
commit 5d20327598
2 changed files with 4 additions and 1 deletions

View file

@ -98,6 +98,9 @@ def add_remote():
else:
flash(_('Community not found. If you are searching for a nsfw community it is blocked by this instance.'), 'warning')
if new_community.banned:
flash(_('That community is banned from %(site)s.', site=g.site.name), 'warning')
return render_template('community/add_remote.html',
title=_('Add remote community'), form=form, new_community=new_community,
subscribed=community_membership(current_user, new_community) >= SUBSCRIPTION_MEMBER, moderating_communities=moderating_communities(current_user.get_id()),

View file

@ -17,7 +17,7 @@
</div>
</div>
</div>
{% if new_community %}
{% if new_community and not new_community.banned %}
<div class="row">
<div class="col mx-auto">
<div class="card mt-5">