Skip to content

Conversation

@spanishharlem
Copy link
Contributor

Adds an "View all comments" option to profile page (/profile/comments), working the same as admin tool.

if not flask.g.user or not flask.g.user.is_moderator:
if user == flask.g.user:
pass
elif not flask.g.user or not flask.g.user.is_moderator:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better as

    # Only moderators and users themselves get to see the comments
    if not flask.g.user or not (flask.g.user == user or flask.g.user.is_moderator):
        flask.abort(403)

<nyaa:categoryId>{{- cat_id }}</nyaa:categoryId>
<nyaa:category> {{- category_name(cat_id) }}</nyaa:category>
<nyaa:size> {{- torrent.filesize | filesizeformat(True) }}</nyaa:size>
<nyaa:comments> {{- torrent.comment_count }}</nyaa:comments>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're now including the comment count from the other PR!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not even sure how did it end up here, ehh.

@nekotrix
Copy link

nekotrix commented Nov 5, 2022

Will this ever get pushed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants