mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
reenable posting and use helper more
This commit is contained in:
parent
b8d227b3c8
commit
42af653ff3
1 changed files with 2 additions and 4 deletions
|
@ -56,10 +56,8 @@ def read(id):
|
|||
@login_required
|
||||
@profile_required
|
||||
def create():
|
||||
flash("Posting is paused for a little while because people want to be rude and spammy.")
|
||||
return redirect("/")
|
||||
if request.method == "POST":
|
||||
submitter = session["auth"]["preferred_username"]
|
||||
submitter = get_session_user()
|
||||
if submitter in config.BANNED_USERS:
|
||||
reason = config.BANNED_USERS[submitter]
|
||||
flash(f"You can't post for now: {reason}")
|
||||
|
@ -120,7 +118,7 @@ def approve(id):
|
|||
@login_required
|
||||
def delete(id):
|
||||
filtered = Post.filter(id=id)
|
||||
user = session["auth"]["preferred_username"]
|
||||
user = get_session_user()
|
||||
if filtered:
|
||||
post = filtered.first()
|
||||
if user == post.submitter:
|
||||
|
|
Loading…
Reference in a new issue