commit/galaxy-central: greg: Fix a bug when setting default history permissions in the user preferences; receiving method now gets all required params.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/a787213d08e1/ changeset: a787213d08e1 user: greg date: 2011-07-08 15:09:02 summary: Fix a bug when setting default history permissions in the user preferences; receiving method now gets all required params. affected #: 2 files (470 bytes) --- a/lib/galaxy/web/controllers/user.py Thu Jul 07 12:13:49 2011 -0400 +++ b/lib/galaxy/web/controllers/user.py Fri Jul 08 09:09:02 2011 -0400 @@ -914,6 +914,9 @@ @web.expose def set_default_permissions( self, trans, cntrller, **kwd ): """Sets the user's default permissions for the new histories""" + params = util.Params( kwd ) + message = util.restore_text( params.get( 'message', '' ) ) + status = params.get( 'status', 'done' ) if trans.user: if 'update_roles_button' in kwd: p = util.Params( kwd ) @@ -926,8 +929,11 @@ action = trans.app.security_agent.get_action( v.action ).action permissions[ action ] = in_roles trans.app.security_agent.user_set_default_permissions( trans.user, permissions ) - return trans.show_ok_message( 'Default new history permissions have been changed.' ) - return trans.fill_template( 'user/permissions.mako', cntrller=cntrller ) + message = 'Default new history permissions have been changed.' + return trans.fill_template( 'user/permissions.mako', + cntrller=cntrller, + message=message, + status=status ) else: # User not logged in, history group must be only public return trans.show_error_message( "You must be logged in to change your default permitted actions." ) --- a/templates/user/permissions.mako Thu Jul 07 12:13:49 2011 -0400 +++ b/templates/user/permissions.mako Fri Jul 08 09:09:02 2011 -0400 @@ -1,6 +1,13 @@ <%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> +<%namespace file="/dataset/security_common.mako" import="render_permission_form" /> + <%def name="title()">Change Default Permissions on New Histories</%def> -<%namespace file="/dataset/security_common.mako" import="render_permission_form" /> + +%if message: + ${render_msg( message, status )} +%endif + <br/><br/><ul class="manage-table-actions"><li> @@ -8,5 +15,5 @@ </li></ul> %if trans.user: - ${render_permission_form( trans.user, trans.user.email, h.url_for(), trans.user.all_roles() )} + ${render_permission_form( trans.user, trans.user.email, h.url_for( controller='user', action='set_default_permissions', cntrller=cntrller ), trans.user.all_roles() )} %endif 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.
participants (1)
-
Bitbucket