Gitlab CSE Unil

Commit ed9d8252 authored by Julien Furrer's avatar Julien Furrer
Browse files

Merge branch 'dev' of...

Merge branch 'dev' of pcpol200-3:/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django into dev
parents 84ce648e 121641e8
...@@ -254,7 +254,6 @@ AAI = { ...@@ -254,7 +254,6 @@ AAI = {
} }
# ATTP = { # ATTP = {
# 'OPTIONS': { # 'OPTIONS': {
# 'CACHE_TIMEOUT': <the time in sec the ttp authorization result is kept in cache> # 'CACHE_TIMEOUT': <the time in sec the ttp authorization result is kept in cache>
......
...@@ -30,3 +30,6 @@ SENDFILE_BACKEND = 'sendfile.backends.development' ...@@ -30,3 +30,6 @@ SENDFILE_BACKEND = 'sendfile.backends.development'
ADIM_PROD = False ADIM_PROD = False
ADIM_DEBUG_JS = True ADIM_DEBUG_JS = True
INSTALLED_APPS += ('django_trap', )
DJANGO_TRAP_STORE_PW = False
...@@ -10,6 +10,8 @@ urlpatterns = [ ...@@ -10,6 +10,8 @@ urlpatterns = [
# url(r'^blog/', include('blog.urls')), # url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
# url(r'^admin/', include('django_trap.urls', namespace='django_trap')),
# url(r'^s-412-5/admin/', include(admin.site.urls)),
url(r'^shibauth/', include('shibauth.urls')), url(r'^shibauth/', include('shibauth.urls')),
url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': "adim/home.html"}), url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': "adim/home.html"}),
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<IfModule rewrite_module> <IfModule rewrite_module>
RewriteEngine On RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403 ## Retourne une 404 pour media/protected au lien d'une 403
RewriteRule ^{{ settings.MEDIA_URL }}/ao_images/.*$ - [R=404,L,NS] RewriteRule ^{{ settings.MEDIA_URL }}ao_images/.*$ - [R=404,L,NS]
#RewriteCond %{REMOTE_ADDR} !^130.223.3.229$ #RewriteCond %{REMOTE_ADDR} !^130.223.3.229$
#RewriteCond %{REQUEST_URI} !^/static/.*$ #RewriteCond %{REQUEST_URI} !^/static/.*$
...@@ -111,5 +111,20 @@ ...@@ -111,5 +111,20 @@
</Location> </Location>
{% endblock rewrite_protected %} {% endblock rewrite_protected %}
{% block rewrite_admin_protected %}
<Location "{% url "admin:index" %}">
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 au lien d'une 403
RewriteCond %{REMOTE_ADDR} !^130.223.72.159$
RewriteRule ^.*$ - [R=404,L,NS]
</IfModule>
<IfModule !rewrite_module>
Order allow,deny
Deny from all
</IfModule>
</Location>
{% endblock rewrite_admin_protected %}
{% endblock main %} {% endblock main %}
</IfModule> </IfModule>
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
{% block rewrite_protected %}{% endblock %} {% block rewrite_protected %}{% endblock %}
{% block rewrite_admin_protected %}{% endblock %}
{% block wsgi %} {% block wsgi %}
{% with NoDaemonProcess=0 daemon_process_name="adim" apache_user="_www" %} {% with NoDaemonProcess=0 daemon_process_name="adim" apache_user="_www" %}
{{ block.super }} {{ block.super }}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment