fix: use single quotation mark 'admin'

吴宇涵 2023-03-23 13:32:11 +08:00
parent 2909b4d973
commit 5cffa1fada
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class UserName:
for c in self.username: # a user name must not include special characters, except non-leading periods or underscores for c in self.username: # a user name must not include special characters, except non-leading periods or underscores
if c in string.punctuation and c != '.' and c != '_': if c in string.punctuation and c != '.' and c != '_':
return f'{c} is not allowed in the user name.' return f'{c} is not allowed in the user name.'
if self.username in ['signup', 'login', 'logout', 'reset', 'mark', 'back', 'unfamiliar', 'familiar', 'del', "admin"]: if self.username in ['signup', 'login', 'logout', 'reset', 'mark', 'back', 'unfamiliar', 'familiar', 'del', 'admin']:
return 'You used a restricted word as your user name. Please come up with a better one.' return 'You used a restricted word as your user name. Please come up with a better one.'
return 'OK' return 'OK'