Commit a6c7ec405c95ea70576ec6629103eda827c642fa

Authored by Sergio Oliveira
1 parent d4c1b6bb

Using colab as auth proxy for trac

Showing 2 changed files with 15 additions and 5 deletions   Show diff stats
src/colab/custom_settings.py
... ... @@ -169,6 +169,9 @@ SOLR_BASE_QUERY = """
169 169 ((Type:changeset OR Type:ticket OR Type:wiki OR Type:thread) AND Title:["" TO *])
170 170 """
171 171  
  172 +COLAB_TRAC_URL = 'http://colab-backend.interlegis.leg.br/'
  173 +
  174 +REVPROXY_ADD_REMOTE_USER = True
172 175  
173 176 try:
174 177 from local_settings import *
... ...
src/colab/urls.py
  1 +
1 2 from django.conf.urls import patterns, include, url
  3 +from django.conf import settings
2 4 from django.views.generic import TemplateView
3 5 from django.contrib import admin
4 6  
  7 +
5 8 admin.autodiscover()
6 9  
7 10 urlpatterns = patterns('',
8 11 url(r'^$', 'colab.deprecated.views.other.home', name='home'),
9   -
  12 +
10 13 url(r'^search/$', 'colab.deprecated.views.other.search', name='search'),
11 14  
12   - url(r'open-data/$', TemplateView.as_view(template_name='open-data.html'),
  15 + url(r'open-data/$', TemplateView.as_view(template_name='open-data.html'),
13 16 name='opendata'),
14 17  
15 18 url(r'^archives/', include('super_archives.urls')),
16   -
  19 +
17 20 url(r'^api/', include('api.urls')),
18   -
  21 +
19 22 url(r'^rss/', include('rss.urls')),
20 23  
21 24 url(r'^user/', include('accounts.urls')), # Kept for backwards compatibility
... ... @@ -25,7 +28,11 @@ urlpatterns = patterns('',
25 28 url(r'^planet/', include('feedzilla.urls')),
26 29  
27 30 (r'^browserid/', include('django_browserid.urls')),
28   -
  31 +
29 32 # Uncomment the next line to enable the admin:
30 33 url(r'^colab/admin/', include(admin.site.urls)),
  34 +
  35 + # Trac URLs
  36 + url(u'^(?P<path>(?:admin|wiki|changeset|newticket|ticket|chrome|timeline|roadmap|browser|report|tags|query|about|prefs|log|attachment|raw-attachment).*)$',
  37 + 'revproxy.views.proxy', {'base_url': settings.COLAB_TRAC_URL})
31 38 )
... ...