remove unnecessary function
parent
fc5d524e87
commit
f1f2393da1
|
@ -30,7 +30,7 @@ WORDLE_COLOR_MAPPINGS = {-1: "🟥", 0: "🟨", 1: "🟩"}
|
|||
@app.get("/h/<sub>/comment/<cid>")
|
||||
@app.get("/h/<sub>/post/<pid>/<anything>/<cid>")
|
||||
@auth_desired_with_logingate
|
||||
def post_pid_comment_cid(cid, pid=None, anything=None, v=LoggedOutUser(), sub=None):
|
||||
def post_pid_comment_cid(v, cid, pid=None, anything=None, sub=None):
|
||||
comment = get_comment(cid, v=v)
|
||||
if not v.can_see(comment): abort(404)
|
||||
if comment.post and comment.post.club and not v.can_see_content(comment): abort(403)
|
||||
|
|
|
@ -8,7 +8,7 @@ from files.__main__ import app
|
|||
@app.get("/giphy")
|
||||
@app.get("/giphy<path>")
|
||||
@auth_required
|
||||
def giphy(v=None, path=None):
|
||||
def giphy(v, path=None):
|
||||
|
||||
searchTerm = request.values.get("searchTerm", "").strip()
|
||||
limit = 48
|
||||
|
|
|
@ -57,7 +57,7 @@ def inject_constants():
|
|||
"KOFI_TOKEN":KOFI_TOKEN, "KOFI_LINK":KOFI_LINK,
|
||||
"approved_embed_hosts":approved_embed_hosts,
|
||||
"site_settings":get_settings(), "EMAIL":EMAIL, "calc_users":calc_users,
|
||||
"max": max, "min": min, "user_can_see":LoggedOutUser.can_see,
|
||||
"max": max, "min": min,
|
||||
"TELEGRAM_LINK":TELEGRAM_LINK, "EMAIL_REGEX_PATTERN":EMAIL_REGEX_PATTERN,
|
||||
"CONTENT_SECURITY_POLICY_DEFAULT":CONTENT_SECURITY_POLICY_DEFAULT,
|
||||
"CONTENT_SECURITY_POLICY_HOME":CONTENT_SECURITY_POLICY_HOME,
|
||||
|
|
|
@ -135,7 +135,7 @@ def submit_get(v, sub=None):
|
|||
@app.get("/h/<sub>/post/<pid>")
|
||||
@app.get("/h/<sub>/post/<pid>/<anything>")
|
||||
@auth_desired_with_logingate
|
||||
def post_id(pid, anything=None, v=LoggedOutUser(), sub=None):
|
||||
def post_id(v, pid, anything=None, sub=None):
|
||||
post = get_post(pid, v=v)
|
||||
if not v.can_see(post): abort(403)
|
||||
if not v.can_see_content(post) and post.club: abort(403)
|
||||
|
|
|
@ -739,7 +739,7 @@
|
|||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% for comment in comments if user_can_see(v, comment) %}
|
||||
{% for comment in comments if v.can_see(comment) %}
|
||||
{{single_comment(comment)}}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
{% include "popover.html" %}
|
||||
|
||||
{% for p in listing if user_can_see(v, p) %}
|
||||
{% for p in listing if v.can_see(p) %}
|
||||
|
||||
{% set ups=p.upvotes %}
|
||||
{% set downs=p.downvotes %}
|
||||
|
|
Loading…
Reference in New Issue