Changeset - e1c9903d7e38
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2011-01-10 20:37:46
marcin@python-works.com
fixed wrong clone url for anonymous access
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/summary.py
Show inline comments
 
@@ -72,27 +72,27 @@ class SummaryController(BaseController):
 

	
 
        c.repo_changesets = Page(c.repo_info, page=1, items_per_page=10,
 
                                 url=url_generator)
 

	
 
        e = request.environ
 

	
 
        if self.rhodecode_user.username == 'default':
 
            #for default(anonymous) user we don't need to pass credentials
 
            username = ''
 
            password = ''
 
        else:
 
            username = str(c.rhodecode_user.username)
 
            password = ''
 
            password = '@'
 

	
 
        uri = u'%(protocol)s://%(user)s%(password)s@%(host)s%(prefix)s/%(repo_name)s' % {
 
        uri = u'%(protocol)s://%(user)s%(password)s%(host)s%(prefix)s/%(repo_name)s' % {
 
                                        'protocol': e.get('wsgi.url_scheme'),
 
                                        'user':username,
 
                                        'password':password,
 
                                        'host':e.get('HTTP_HOST'),
 
                                        'prefix':e.get('SCRIPT_NAME'),
 
                                        'repo_name':c.repo_name, }
 
        c.clone_repo_url = uri
 
        c.repo_tags = OrderedDict()
 
        for name, hash in c.repo_info.tags.items()[:10]:
 
            try:
 
                c.repo_tags[name] = c.repo_info.get_changeset(hash)
 
            except ChangesetError:
0 comments (0 inline, 0 general)