forked from rDrama/rDrama
reduce chudrama requirement from 20k to 5k
parent
e1e7258e7a
commit
da4070b62a
|
@ -91,7 +91,7 @@ class Comment(Base):
|
||||||
if v:
|
if v:
|
||||||
if v.id == self.author_id: return True
|
if v.id == self.author_id: return True
|
||||||
if v.id == self.post.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
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class Submission(Base):
|
||||||
if self.sub != 'chudrama': return True
|
if self.sub != 'chudrama': return True
|
||||||
if v:
|
if v:
|
||||||
if v.id == self.author_id: return True
|
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
|
return False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -29,7 +29,7 @@ def front_all(v, sub=None, subdomain=None):
|
||||||
|
|
||||||
if sub:
|
if sub:
|
||||||
sub = sub.strip().lower()
|
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()
|
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)
|
if (request.path.startswith('/h/') or request.path.startswith('/s/')) and not sub: abort(404)
|
||||||
|
|
Loading…
Reference in New Issue