Show More
@@ -51,10 +51,12 b' class SummaryController(BaseController):' | |||||
51 | c.repo_info = hg_model.get_repo(c.repo_name) |
|
51 | c.repo_info = hg_model.get_repo(c.repo_name) | |
52 | c.repo_changesets = Page(list(c.repo_info[:10]), page=1, items_per_page=20) |
|
52 | c.repo_changesets = Page(list(c.repo_info[:10]), page=1, items_per_page=20) | |
53 | e = request.environ |
|
53 | e = request.environ | |
54 | uri = u'%(protocol)s://%(user)s@%(host)s/%(repo_name)s' % { |
|
54 | ||
|
55 | uri = u'%(protocol)s://%(user)s@%(host)s%(prefix)s/%(repo_name)s' % { | |||
55 | 'protocol': e.get('wsgi.url_scheme'), |
|
56 | 'protocol': e.get('wsgi.url_scheme'), | |
56 | 'user':str(c.hg_app_user.username), |
|
57 | 'user':str(c.hg_app_user.username), | |
57 | 'host':e.get('HTTP_HOST'), |
|
58 | 'host':e.get('HTTP_HOST'), | |
|
59 | 'prefix':e.get('SCRIPT_NAME'), | |||
58 | 'repo_name':c.repo_name, } |
|
60 | 'repo_name':c.repo_name, } | |
59 | c.clone_repo_url = uri |
|
61 | c.clone_repo_url = uri | |
60 | c.repo_tags = OrderedDict() |
|
62 | c.repo_tags = OrderedDict() |
@@ -255,10 +255,15 b' class LoginRequired(object):' | |||||
255 | return func(*fargs, **fkwargs) |
|
255 | return func(*fargs, **fkwargs) | |
256 | else: |
|
256 | else: | |
257 | log.warn('user %s not authenticated', user.username) |
|
257 | log.warn('user %s not authenticated', user.username) | |
258 |
|
258 | |||
259 | p = request.environ.get('PATH_INFO') |
|
259 | p = '' | |
|
260 | if request.environ.get('SCRIPT_NAME') != '/': | |||
|
261 | p += request.environ.get('SCRIPT_NAME') | |||
|
262 | ||||
|
263 | p += request.environ.get('PATH_INFO') | |||
260 | if request.environ.get('QUERY_STRING'): |
|
264 | if request.environ.get('QUERY_STRING'): | |
261 | p += '?' + request.environ.get('QUERY_STRING') |
|
265 | p += '?' + request.environ.get('QUERY_STRING') | |
|
266 | ||||
262 | log.debug('redirecting to login page with %s', p) |
|
267 | log.debug('redirecting to login page with %s', p) | |
263 | return redirect(url('login_home', came_from=p)) |
|
268 | return redirect(url('login_home', came_from=p)) | |
264 |
|
269 |
General Comments 0
You need to be logged in to leave comments.
Login now