commit/galaxy-central: Andrew Robinson: Fixed a clobbering of 'util' package in the permissions API.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/2060df75cb28/ Changeset: 2060df75cb28 User: Andrew Robinson Date: 2013-08-05 04:17:52 Summary: Fixed a clobbering of 'util' package in the permissions API. - used a qualified import to avoid a module name clobbering. This addresses the "AttributeError: 'module' object has no attribute 'Params'" exception when updating permissions via the GalaxyAPI. Affected #: 1 file diff -r 8ca6cfea19091f0d44be3eec3b3d18794133a39a -r 2060df75cb2817fa567853af141c11b53d1ea0da lib/galaxy/webapps/galaxy/api/permissions.py --- a/lib/galaxy/webapps/galaxy/api/permissions.py +++ b/lib/galaxy/webapps/galaxy/api/permissions.py @@ -3,7 +3,8 @@ """ import logging, os, string, shutil, urllib, re, socket from cgi import escape, FieldStorage -from galaxy import util, datatypes, jobs, web, util +import galaxy.util +from galaxy import util, datatypes, jobs, web from galaxy.web.base.controller import * from galaxy.util.sanitize_html import sanitize_html from galaxy.model.orm import * @@ -23,7 +24,7 @@ trans.response.status = 403 return "You are not authorized to update library permissions." - params = util.Params( payload ) + params = galaxy.util.Params( payload ) try: decoded_library_id = trans.security.decode_id( library_id ) except TypeError: @@ -38,7 +39,7 @@ permissions = {} for k, v in trans.app.model.Library.permitted_actions.items(): role_params = params.get( k + '_in', [] ) - in_roles = [ trans.sa_session.query( trans.app.model.Role ).get( trans.security.decode_id( x ) ) for x in util.listify( role_params ) ] + in_roles = [ trans.sa_session.query( trans.app.model.Role ).get( trans.security.decode_id( x ) ) for x in galaxy.util.listify( role_params ) ] permissions[ trans.app.security_agent.get_action( v.action ) ] = in_roles trans.app.security_agent.set_all_library_permissions( trans, library, permissions ) trans.sa_session.refresh( library ) 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)
-
commits-noreply@bitbucket.org