From 94ef41e180a701e8b26ecb1a24dcd770f37b146d Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 22 May 2014 19:31:34 -0400 Subject: [PATCH] Pep8/spacing --- lib/galaxy/security/validate_user_input.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/security/validate_user_input.py b/lib/galaxy/security/validate_user_input.py index 142c44b52d3..5aa4f8ca89f 100644 --- a/lib/galaxy/security/validate_user_input.py +++ b/lib/galaxy/security/validate_user_input.py @@ -6,6 +6,7 @@ VALID_PUBLICNAME_SUB = re.compile( "[^a-z0-9\-]" ) VALID_EMAIL_RE = re.compile( "[^@]+@[^@]+\.[^@]+" ) FILL_CHAR = '-' + def validate_email( trans, email, user=None, check_dup=True ): """ Validates the email format, also checks whether the domain is blacklisted in the disposable domains configuration. @@ -25,6 +26,7 @@ def validate_email( trans, email, user=None, check_dup=True ): message = "Please enter your permanent email address." return message + def validate_publicname( trans, publicname, user=None ): # User names must be at least four characters in length and contain only lower-case # letters, numbers, and the '-' character. @@ -44,10 +46,11 @@ def validate_publicname( trans, publicname, user=None ): return "Public name is taken; please choose another" return '' + def transform_publicname( trans, publicname, user=None ): # User names must be at least four characters in length and contain only lower-case # letters, numbers, and the '-' character. - #TODO: Enhance to allow generation of semi-random publicnnames e.g., when valid but taken + # TODO: Enhance to allow generation of semi-random publicnnames e.g., when valid but taken if user and user.username == publicname: return publicname elif publicname not in [ 'None', None, '' ]: @@ -58,6 +61,7 @@ def transform_publicname( trans, publicname, user=None ): return publicname return '' + def validate_password( trans, password, confirm ): if len( password ) < 6: return "Use a password of at least 6 characters"