DB CHANGE: Add uploader ip address to torrent column and show on torrent view page for superadmins.

Added migration script!: remove sukebei_ lines if your local db does not have those.
Show users ip address on user page for superadmins.
Rename Admin to Moderator internally.
Moderators can now change user level to trusted.
Superadmins can make users moderator.
Improve changing user level.
This commit is contained in:
nyaadev
2017-05-21 19:12:15 +02:00
parent 152e547ac5
commit 9af778217b
8 changed files with 119 additions and 58 deletions

View File

@@ -263,7 +263,7 @@ class UploadForm(FlaskForm):
class UserForm(FlaskForm):
user_class = DisabledSelectField('Change User Class')
user_class = SelectField('Change User Class')
def validate_user_class(form, field):
if not field.data:
@@ -294,7 +294,8 @@ def _validate_trackers(torrent_dict, tracker_to_check_for=None):
for announce in announce_list:
_validate_list(announce, 'announce-list item')
announce_string = _validate_bytes(announce[0], 'announce-list item url', test_decode='utf-8')
announce_string = _validate_bytes(
announce[0], 'announce-list item url', test_decode='utf-8')
if tracker_to_check_for and announce_string.lower() == tracker_to_check_for.lower():
tracker_found = True