Allow auto-approval for all users that aren't banned

This commit is contained in:
rubenwardy
2023-12-29 11:36:25 +00:00
parent 0488b129fc
commit 41477980df
3 changed files with 7 additions and 5 deletions

View File

@@ -192,6 +192,10 @@ class User(db.Model, UserMixin):
ban = db.relationship("UserBan", foreign_keys="UserBan.user_id", back_populates="user", uselist=False)
@property
def is_banned(self):
return (self.ban and not self.ban.has_expired) or self.rank == UserRank.BANNED
def get_dict(self):
from app.utils.flask import abs_url_for
return {