1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/0fc6c5554877/ Changeset: 0fc6c5554877 User: martenson Date: 2013-10-02 15:39:40 Summary: activation config settings made better Affected #: 3 files diff -r 0026e8e49df4273dc9bebcf3475e1873e5e808f3 -r 0fc6c5554877c4389fc074cdfac60fdc12ebcb6e lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -132,7 +132,7 @@ self.admin_users = kwargs.get( "admin_users", "" ) self.mailing_join_addr = kwargs.get('mailing_join_addr',"galaxy-announce-join@bx.psu.edu") self.error_email_to = kwargs.get( 'error_email_to', None ) - self.admin_email = kwargs.get( 'admin_email', None ) + self.activation_email = kwargs.get( 'activation_email', None ) self.user_activation_on = kwargs.get( 'user_activation_on', None ) self.activation_grace_period = kwargs.get( 'activation_grace_period', None ) self.inactivity_box_content = kwargs.get( 'inactivity_box_content', None ) @@ -143,10 +143,10 @@ if self.blacklist_location is not None: self.blacklist_file = resolve_path( kwargs.get( 'blacklist_file', None ), self.root ) try: - with open(self.blacklist_file) as blacklist: - self.blacklist_content = [ line.rstrip() for line in blacklist.readlines() ] + with open( self.blacklist_file ) as blacklist: + self.blacklist_content = [ line.rstrip() for line in blacklist.readlines() ] except IOError: - print ( "CONFIGURATION ERROR: Can't open supplied blacklist file from path: " + str( self.blacklist_file ) ) + print ( "CONFIGURATION ERROR: Can't open supplied blacklist file from path: " + str( self.blacklist_file ) ) self.smtp_server = kwargs.get( 'smtp_server', None ) self.smtp_username = kwargs.get( 'smtp_username', None ) self.smtp_password = kwargs.get( 'smtp_password', None ) diff -r 0026e8e49df4273dc9bebcf3475e1873e5e808f3 -r 0fc6c5554877c4389fc074cdfac60fdc12ebcb6e lib/galaxy/webapps/galaxy/controllers/user.py --- a/lib/galaxy/webapps/galaxy/controllers/user.py +++ b/lib/galaxy/webapps/galaxy/controllers/user.py @@ -491,12 +491,12 @@ message = "No such user (please note that login is case sensitive)" elif user.deleted: message = "This account has been marked deleted, contact your local Galaxy administrator to restore the account." - if trans.app.config.admin_email is not None: - message += 'Contact: %s' % trans.app.config.admin_email + if trans.app.config.error_email_to is not None: + message += ' Contact: %s' % trans.app.config.error_email_to elif user.external: message = "This account was created for use with an external authentication method, contact your local Galaxy administrator to activate it." - if trans.app.config.admin_email is not None: - message += 'Contact: %s' % trans.app.config.admin_email + if trans.app.config.error_email_to is not None: + message += ' Contact: %s' % trans.app.config.error_email_to elif not user.check_password( password ): message = "Invalid password" elif trans.app.config.user_activation_on and not user.active: # activation is ON and the user is INACTIVE @@ -536,8 +536,8 @@ message = 'This account has not been activated yet. The activation link has been sent again. Please check your email address %s.<br>' % email else: message = 'This account has not been activated yet but we are unable to send the activation link. Please contact your local Galaxy administrator.' - if trans.app.config.admin_email is not None: - message += 'Contact: %s' % trans.app.config.admin_email + if trans.app.config.error_email_to is not None: + message += ' Contact: %s' % trans.app.config.error_email_to return message def is_outside_grace_period ( self, trans, create_time ): @@ -591,8 +591,8 @@ is_admin = cntrller == 'admin' and trans.user_is_admin if not trans.app.config.allow_user_creation and not trans.user_is_admin(): message = 'User registration is disabled. Please contact your local Galaxy administrator for an account.' - if trans.app.config.admin_email is not None: - message += 'Contact: %s' % trans.app.config.admin_email + if trans.app.config.error_email_to is not None: + message += ' Contact: %s' % trans.app.config.error_email_to status = 'error' else: if not refresh_frames: @@ -733,8 +733,8 @@ success = True else: message = 'Unable to send activation email, please contact your local Galaxy administrator.' - if trans.app.config.admin_email is not None: - message += 'Contact: %s' % trans.app.config.admin_email + if trans.app.config.error_email_to is not None: + message += ' Contact: %s' % trans.app.config.error_email_to success = False else: # User activation is OFF, proceed without sending the activation email. message = 'Now logged in as %s.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) ) @@ -752,7 +752,7 @@ "Activation link: %s \n\n" "Your Galaxy Team" % ( email, activation_link )) to = email - frm = trans.app.config.admin_email + frm = trans.app.config.activation_email subject = 'How to activate your Galaxy account' try: util.send_mail( frm, to, subject, body, trans.app.config ) diff -r 0026e8e49df4273dc9bebcf3475e1873e5e808f3 -r 0fc6c5554877c4389fc074cdfac60fdc12ebcb6e universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -269,11 +269,11 @@ # Datasets in an error state include a link to report the error. Those reports # will be sent to this address. Error reports are disabled if no address is set. +# Also this email is shown as a contact to user in case of Galaxy misconfiguration and other events user may encounter. #error_email_to = None -# Administrator's email is shown to user in case of Galaxy misconfiguration or a generic error. -# It is also used as a sender for the account activation mail. -#admin_email = None +# Activation email is used as a sender ('from' field) for the account activation mail. +#activation_email = None # E-mail domains blacklist is used for filtering out users that are using disposable email address # during the registration. If their address domain matches any domain in the BL they are refused the registration. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.