diff rhodecode/controllers/summary.py @ 910:811fa5d45de8 beta

Rewrite simehg for enabling cloning with raw url for anonymous access + some optimizations for making less queries when authenticating users. added debug to test hg operations
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 03 Jan 2011 00:47:16 +0100
parents 07a6e8c65526
children e1c9903d7e38
line wrap: on
line diff
--- a/rhodecode/controllers/summary.py	Mon Jan 03 00:30:05 2011 +0100
+++ b/rhodecode/controllers/summary.py	Mon Jan 03 00:47:16 2011 +0100
@@ -76,13 +76,16 @@
         e = request.environ
 
         if self.rhodecode_user.username == 'default':
-            password = ':default'
+            #for default(anonymous) user we don't need to pass credentials
+            username = ''
+            password = ''
         else:
+            username = str(c.rhodecode_user.username)
             password = ''
 
         uri = u'%(protocol)s://%(user)s%(password)s@%(host)s%(prefix)s/%(repo_name)s' % {
                                         'protocol': e.get('wsgi.url_scheme'),
-                                        'user':str(c.rhodecode_user.username),
+                                        'user':username,
                                         'password':password,
                                         'host':e.get('HTTP_HOST'),
                                         'prefix':e.get('SCRIPT_NAME'),