commit/galaxy-central: james_taylor: biostar: send encoded unique ID for user as username
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/2a1a820d0357/ Changeset: 2a1a820d0357 User: james_taylor Date: 2013-03-27 20:36:07 Summary: biostar: send encoded unique ID for user as username Affected #: 1 file diff -r bc62ff98a7e61a1fe6d24bddcfcd277b39573256 -r 2a1a820d0357b6d4bc7632dc88e6853acd5622ae lib/galaxy/webapps/galaxy/controllers/biostar.py --- a/lib/galaxy/webapps/galaxy/controllers/biostar.py +++ b/lib/galaxy/webapps/galaxy/controllers/biostar.py @@ -72,14 +72,16 @@ payload = dict( DEFAULT_PAYLOAD, **payload ) # Do the best we can of providing user information for the payload if trans.user: + payload['username'] = "user-" + trans.security.encode_id( trans.user.id ) payload['email'] = trans.user.email if trans.user.username: - payload['username'] = trans.user.username payload['display_name'] = trans.user.username else: - payload['display_name'] = "Galaxy User" + payload['display_name'] = trans.user.email.split( "@" )[0] else: - payload['username'] = payload['display_name'] = "Anonymous Galaxy User %d" % trans.galaxy_session.id + encoded = trans.security.encode_id( trans.galaxy_session.id ) + payload['username'] = "anon-" + encoded + payload['display_name'] = "Anonymous Galaxy User %d" % encoded[0:8] data, digest = encode_data( trans.app.config.biostar_key, payload ) return trans.response.send_redirect( url_for( trans.app.config.biostar_url, data=data, digest=digest, name=trans.app.config.biostar_key_name, action=biostar_action ) ) 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