forked from MarseyWorld/MarseyWorld
disallow brocels from disabling stealth mode
parent
5f9dac55ab
commit
8c99bebd87
|
@ -17,8 +17,6 @@ def exile_post(v, pid):
|
||||||
sub = p.sub
|
sub = p.sub
|
||||||
if not sub: abort(400)
|
if not sub: abort(400)
|
||||||
|
|
||||||
if sub == 'braincels': abort(403)
|
|
||||||
|
|
||||||
if not v.mods(sub): abort(403)
|
if not v.mods(sub): abort(403)
|
||||||
|
|
||||||
u = p.author
|
u = p.author
|
||||||
|
@ -46,8 +44,6 @@ def exile_comment(v, cid):
|
||||||
sub = c.post.sub
|
sub = c.post.sub
|
||||||
if not sub: abort(400)
|
if not sub: abort(400)
|
||||||
|
|
||||||
if sub == 'braincels': abort(403)
|
|
||||||
|
|
||||||
if not v.mods(sub): abort(403)
|
if not v.mods(sub): abort(403)
|
||||||
|
|
||||||
u = c.author
|
u = c.author
|
||||||
|
@ -518,7 +514,7 @@ def sub_stealth(v, sub):
|
||||||
sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none()
|
sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none()
|
||||||
if not sub: abort(404)
|
if not sub: abort(404)
|
||||||
|
|
||||||
if sub.name == 'smuggies': abort(403)
|
if sub.name in ('smuggies','braincels'): abort(403)
|
||||||
if not v.mods(sub.name): abort(403)
|
if not v.mods(sub.name): abort(403)
|
||||||
|
|
||||||
sub.stealth = not sub.stealth
|
sub.stealth = not sub.stealth
|
||||||
|
|
Loading…
Reference in New Issue