lock user profiles from logged-out-cels

master
Aevann 2023-05-03 17:50:42 +03:00
parent 514fb320cf
commit 744c95f7ca
2 changed files with 5 additions and 5 deletions

View File

@ -812,7 +812,7 @@ def userpagelisting(user:User, v=None, page:int=1, sort="new", t="all"):
@app.get("/@<username>") @app.get("/@<username>")
@limiter.limit(DEFAULT_RATELIMIT) @limiter.limit(DEFAULT_RATELIMIT)
@auth_desired_with_logingate @auth_required
def u_username_wall(v:Optional[User], username:str): def u_username_wall(v:Optional[User], username:str):
u = get_user(username, v=v, include_blocks=True) u = get_user(username, v=v, include_blocks=True)
if username != u.username: if username != u.username:
@ -863,7 +863,7 @@ def u_username_wall(v:Optional[User], username:str):
@app.get("/@<username>/wall/comment/<int:cid>") @app.get("/@<username>/wall/comment/<int:cid>")
@limiter.limit(DEFAULT_RATELIMIT) @limiter.limit(DEFAULT_RATELIMIT)
@auth_desired_with_logingate @auth_required
def u_username_wall_comment(v:User, username:str, cid): def u_username_wall_comment(v:User, username:str, cid):
comment = get_comment(cid, v=v) comment = get_comment(cid, v=v)
if not comment.wall_user_id: abort(400) if not comment.wall_user_id: abort(400)
@ -912,7 +912,7 @@ def u_username_wall_comment(v:User, username:str, cid):
@app.get("/@<username>/posts") @app.get("/@<username>/posts")
@limiter.limit(DEFAULT_RATELIMIT) @limiter.limit(DEFAULT_RATELIMIT)
@auth_desired_with_logingate @auth_required
def u_username(v:Optional[User], username:str): def u_username(v:Optional[User], username:str):
u = get_user(username, v=v, include_blocks=True) u = get_user(username, v=v, include_blocks=True)
if username != u.username: if username != u.username:
@ -987,7 +987,7 @@ def u_username(v:Optional[User], username:str):
@app.get("/@<username>/comments") @app.get("/@<username>/comments")
@limiter.limit(DEFAULT_RATELIMIT) @limiter.limit(DEFAULT_RATELIMIT)
@auth_desired_with_logingate @auth_required
def u_username_comments(username, v=None): def u_username_comments(username, v=None):
u = get_user(username, v=v, include_blocks=True) u = get_user(username, v=v, include_blocks=True)
if username != u.username: if username != u.username:

View File

@ -215,7 +215,7 @@
{{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, true)}} {{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, true)}}
{{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, false, 200, v.patron or v.sig)}} {{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, false, 200, v.patron or v.sig)}}
{# toggle_section(title, id, name, flag, below_text, disabled) #} {# toggle_section(title, id, name, flag, below_text, disabled) #}
{{common.toggle_section('Private Mode', 'privateswitch', 'private', v.is_private, 'This will hide your post and comment history from others. We will also ask search engines to not index your profile page. (Your content will still be accessible via direct link.)', false)}} {{common.toggle_section('Private Mode', 'privateswitch', 'private', v.is_private, 'This will hide your profile page from others.', false)}}
{{common.toggle_section('Spider', 'spiderswitch', 'spider', v.spider, 'Have a spider friend accompany you during your journey on the site.', false)}} {{common.toggle_section('Spider', 'spiderswitch', 'spider', v.spider, 'Have a spider friend accompany you during your journey on the site.', false)}}
</div> </div>
</section> </section>