This commit is contained in:
Kfir Hadas 2017-05-25 22:19:42 +03:00
parent 559602d19b
commit d7181cf6a1
1 changed files with 3 additions and 1 deletions

View File

@ -664,7 +664,9 @@ def view_torrent(torrent_id):
flask.flash('Comment successfully posted.', 'success')
return flask.redirect(flask.url_for('view_torrent', torrent_id=torrent_id, _anchor='com-'+str(torrent_count)))
return flask.redirect(flask.url_for('view_torrent',
torrent_id=torrent_id,
_anchor='com-' + str(torrent_count)))
# Only allow owners and admins to edit torrents
can_edit = flask.g.user and (flask.g.user is torrent.user or flask.g.user.is_moderator)