1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5dac92781184/
Changeset: 5dac92781184
User: greg
Date: 2013-09-24 22:38:10
Summary: Several fixes for recent registration enhancements (email activation) to allow users to register in the tool shed.
Affected #: 1 file
diff -r b3a6908168eed3e5846728cabcecb9a9c02c05c6 -r 5dac9278118487280f14e3a8365535e69a62a960 lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -515,6 +515,7 @@
"""
Function processes user login. It is called in case all the login requirements are valid.
"""
+ message = ''
trans.handle_user_login( user )
if trans.webapp.name == 'galaxy':
trans.log_event( "User logged in" )
@@ -662,6 +663,7 @@
email = util.restore_text( kwd.get( 'email', '' ) )
password = kwd.get( 'password', '' )
username = util.restore_text( kwd.get( 'username', '' ) )
+ message = kwd.get( 'message', '' )
status = kwd.get( 'status', 'done' )
is_admin = cntrller == 'admin' and trans.user_is_admin()
user = trans.app.model.User( email=email )
@@ -673,6 +675,7 @@
trans.sa_session.flush()
trans.app.security_agent.create_private_user_role( user )
error = ''
+ success = True
if trans.webapp.name == 'galaxy':
# We set default user permissions, before we log in and set the default history permissions
trans.app.security_agent.user_set_default_permissions( user,
@@ -722,7 +725,7 @@
status = 'error'
success = False
else:
- if trans.app.config.user_activation_on:
+ if trans.webapp.name == 'galaxy':
is_activation_sent = self.send_verification_email( trans, email )
if is_activation_sent:
message = 'Now logged in as %s.<br>Verification email has been sent to your email address. Please verify it by clicking the activation link in the email.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) )
@@ -732,9 +735,6 @@
if trans.app.config.admin_email is not None:
message += 'Contact: %s' % trans.app.config.admin_email
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( '/' ) )
- success = True
return ( message, status, user, success )
def send_verification_email( self, trans, email ):
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b3a6908168ee/
Changeset: b3a6908168ee
User: martenson
Date: 2013-09-24 22:11:39
Summary: bugfix: registration process ignoring the activation configuration and always sending email
Affected #: 1 file
diff -r d0bbd2a2b4a2c5eb7b0eb8684a1cd030fd01f269 -r b3a6908168eed3e5846728cabcecb9a9c02c05c6 lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -722,15 +722,19 @@
status = 'error'
success = False
else:
- is_activation_sent = self.send_verification_email( trans, email )
- if is_activation_sent:
- message = 'Now logged in as %s.<br>Verification email has been sent to your email address. Please verify it by clicking the activation link in the email.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) )
+ if trans.app.config.user_activation_on:
+ is_activation_sent = self.send_verification_email( trans, email )
+ if is_activation_sent:
+ message = 'Now logged in as %s.<br>Verification email has been sent to your email address. Please verify it by clicking the activation link in the email.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) )
+ 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
+ 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( '/' ) )
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
- success = False
return ( message, status, user, success )
def send_verification_email( self, trans, email ):
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/aec9599cfcbf/
Changeset: aec9599cfcbf
User: martenson
Date: 2013-09-24 20:14:05
Summary: check only for galaxy webapp
Affected #: 1 file
diff -r ff45728abdd18e302667b06203ee524ded495ba9 -r aec9599cfcbfb1f759aa5800800b390fdb82596b templates/base/base_panels.mako
--- a/templates/base/base_panels.mako
+++ b/templates/base/base_panels.mako
@@ -5,7 +5,7 @@
self.has_right_panel = hasattr( self, 'right_panel' )
self.message_box_visible = app.config.message_box_visible
self.show_inactivity_warning = False
- if trans.user:
+ if trans.webapp.name == 'galaxy' and trans.user:
self.show_inactivity_warning = ( ( trans.user.active is False ) and ( app.config.user_activation_on ) and ( app.config.inactivity_box_content is not None ) )
self.overlay_visible=False
self.active_view=None
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ff45728abdd1/
Changeset: ff45728abdd1
User: greg
Date: 2013-09-24 19:44:38
Summary: Fix for browing repositories in the tool shed that are owned by a specified user.
Affected #: 1 file
diff -r 448487d92454f73319affb6a0bb99e7f4d7f3c2f -r ff45728abdd18e302667b06203ee524ded495ba9 lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -416,7 +416,8 @@
repository_id = kwd.get( 'id', None )
if repository_id:
repository = suc.get_repository_in_tool_shed( trans, repository_id )
- kwd[ 'user_id' ] = trans.security.encode_id( repository.user.id )
+ user_id = trans.security.encode_id( repository.user.id )
+ kwd[ 'user_id' ] = user_id
else:
# The user selected a repository revision which results in a refresh_on_change.
selected_changeset_revision, repository = suc.get_repository_from_refresh_on_change( trans, **kwd )
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f3c381ec1446/
Changeset: f3c381ec1446
User: martenson
Date: 2013-09-24 19:29:55
Summary: registration warning message will show based on configuration, it is probably not relevant for other instances than the main
Affected #: 4 files
diff -r 746d156319c1ed2ba80fab5a1a5f181fcd4a1758 -r f3c381ec1446562e5a95ae9f5feeac8e330f4ec9 lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -136,6 +136,7 @@
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 )
+ self.registration_warning_message = kwargs.get( 'registration_warning_message', None )
# Get the disposable email domains blacklist file and its contents
self.blacklist_location = kwargs.get( 'blacklist_file', None )
self.blacklist_content = None
diff -r 746d156319c1ed2ba80fab5a1a5f181fcd4a1758 -r f3c381ec1446562e5a95ae9f5feeac8e330f4ec9 lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -640,6 +640,8 @@
user_type_fd_id_select_field = None
user_type_form_definition = None
widgets = []
+ # Warning message that is shown on the registration page.
+ registration_warning_message = trans.app.config.registration_warning_message
return trans.fill_template( '/user/register.mako',
cntrller=cntrller,
email=email,
@@ -652,6 +654,7 @@
redirect=redirect,
redirect_url=redirect_url,
refresh_frames=refresh_frames,
+ registration_warning_message=registration_warning_message,
message=message,
status=status )
diff -r 746d156319c1ed2ba80fab5a1a5f181fcd4a1758 -r f3c381ec1446562e5a95ae9f5feeac8e330f4ec9 templates/user/register.mako
--- a/templates/user/register.mako
+++ b/templates/user/register.mako
@@ -107,9 +107,11 @@
<input type="submit" name="create_user_button" value="Submit"/></div></form>
+ %if registration_warning_message:
<div class="alert alert-danger" style="margin: 30px 12px 12px 12px;">
- Please register only one account - we provide this service free of charge and have limited computational resources. Multi-accounts are tracked and will be subjected to account termination and data deletion.
+ ${registration_warning_message}
</div>
+ %endif
</div></%def>
diff -r 746d156319c1ed2ba80fab5a1a5f181fcd4a1758 -r f3c381ec1446562e5a95ae9f5feeac8e330f4ec9 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -275,6 +275,10 @@
# during the registration. If their address domain matches any domain in the BL they are refused the registration.
#blacklist_file = config/disposable_email_blacklist.conf
+# Registration warning message is used to discourage people from registering multiple accounts. Applies mostly for the main Galaxy instance.
+# If no message specified the warning box will not be shown.
+#registration_warning_message = Please register only one account - we provide this service free of charge and have limited computational resources. Multi-accounts are tracked and will be subjected to account termination and data deletion.
+
# -- Account activation
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.