-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lets user see his own comments #529
base: master
Are you sure you want to change the base?
Conversation
nyaa/views/users.py
Outdated
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: |
There was a problem hiding this comment.
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/templates/rss.xml
Outdated
@@ -40,6 +40,7 @@ | |||
<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> |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
Will this ever get pushed? |
Adds an "View all comments" option to profile page (/profile/comments), working the same as admin tool.