allow admin to give trusted to users. show users their own info when logged in

This commit is contained in:
martstern
2017-05-15 07:49:25 -04:00
parent b7a2aa78a4
commit eb59116429
5 changed files with 93 additions and 3 deletions

View File

@@ -257,6 +257,14 @@ class UploadForm(FlaskForm):
bencoded_info_dict=bencoded_info_dict)
class UserForm(FlaskForm):
user_class = DisabledSelectField('Change User Class')
def validate_user_class(form, field):
if not field.data:
raise ValidationError('Please select a proper user class')
class TorrentFileData(object):
"""Quick and dirty class to pass data from the validator"""