reduce chudrama requirement from 20k to 5k

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-20 00:45:21 +02:00
parent e1e7258e7a
commit da4070b62a
3 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ class Comment(Base):
if v:
if v.id == self.author_id: return True
if v.id == self.post.author_id: return True
if v and v.truecoins >= 20000: return True
if v and v.truecoins >= 5000: return True
return False

View File

@ -82,7 +82,7 @@ class Submission(Base):
if self.sub != 'chudrama': return True
if v:
if v.id == self.author_id: return True
if v and v.truecoins >= 20000: return True
if v and v.truecoins >= 5000: return True
return False
@property

View File

@ -29,7 +29,7 @@ def front_all(v, sub=None, subdomain=None):
if sub:
sub = sub.strip().lower()
if sub == 'chudrama' and not (v and v.truecoins >= 20000): abort(403)
if sub == 'chudrama' and not (v and v.truecoins >= 5000): abort(403)
sub = g.db.query(Sub).filter_by(name=sub).one_or_none()
if (request.path.startswith('/h/') or request.path.startswith('/s/')) and not sub: abort(404)