Skip to content
Snippets Groups Projects
Commit 18aa6546 authored by Branson Craig Stephens's avatar Branson Craig Stephens
Browse files

Added guardian to installed apps and added ANONYMOUS_USER_ID=-1 and...

Added guardian to installed apps and added ANONYMOUS_USER_ID=-1 and GUARDIAN_RENDER_403=True to settings.
parent 6de394fd
No related branches found
No related tags found
No related merge requests found
...@@ -66,20 +66,20 @@ MIDDLEWARE_CLASSES = [ ...@@ -66,20 +66,20 @@ MIDDLEWARE_CLASSES = [
# 'debug_toolbar.middleware.DebugToolbarMiddleware', # 'debug_toolbar.middleware.DebugToolbarMiddleware',
] ]
INSTALLED_APPS = ( #INSTALLED_APPS = (
'django.contrib.auth', # 'django.contrib.auth',
'django.contrib.admin', # 'django.contrib.admin',
'django.contrib.contenttypes', # 'django.contrib.contenttypes',
'django.contrib.sessions', # 'django.contrib.sessions',
'django.contrib.sites', # 'django.contrib.sites',
'django.contrib.staticfiles', # 'django.contrib.staticfiles',
'gracedb', # 'gracedb',
'userprofile', # 'userprofile',
'ligoauth', # 'ligoauth',
'rest_framework', # 'rest_framework',
'south', # 'south',
# 'debug_toolbar', ## 'debug_toolbar',
) #)
#INTERNAL_IPS = ( #INTERNAL_IPS = (
# '129.89.61.55', # '129.89.61.55',
......
...@@ -183,8 +183,12 @@ AUTHENTICATION_BACKENDS = ( ...@@ -183,8 +183,12 @@ AUTHENTICATION_BACKENDS = (
# 'ligoauth.middleware.auth.RemoteUserBackend', # 'ligoauth.middleware.auth.RemoteUserBackend',
# 'ligodjangoauth.LigoShibbolethAuthBackend', # 'ligodjangoauth.LigoShibbolethAuthBackend',
# 'django.contrib.auth.backends.ModelBackend', # 'django.contrib.auth.backends.ModelBackend',
'guardian.backends.ObjectPermissionBackend',
) )
ANONYMOUS_USER_ID = -1
GUARDIAN_RENDER_403 = True
SHIB_AUTHENTICATION_SESSION_INITIATOR = 'https://moe.phys.uwm.edu/Shibboleth.sso/Login' SHIB_AUTHENTICATION_SESSION_INITIATOR = 'https://moe.phys.uwm.edu/Shibboleth.sso/Login'
# If these are left at default, when the Shibboleth middleware # If these are left at default, when the Shibboleth middleware
...@@ -227,6 +231,7 @@ INSTALLED_APPS = ( ...@@ -227,6 +231,7 @@ INSTALLED_APPS = (
'ligoauth', 'ligoauth',
'rest_framework', 'rest_framework',
'south', 'south',
'guardian',
) )
REST_FRAMEWORK = { REST_FRAMEWORK = {
...@@ -244,6 +249,11 @@ STATICFILES_FINDERS = ( ...@@ -244,6 +249,11 @@ STATICFILES_FINDERS = (
STATICFILES_DIRS = () STATICFILES_DIRS = ()
# Added in order to perform data migrations on the auth app
SOUTH_MIGRATION_MODULES = {
'auth' : 'migrations.auth',
}
# XXX The following Log settings are for a performance metric. # XXX The following Log settings are for a performance metric.
import logging import logging
LOG_ROOT = '/home/gracedb/logs' LOG_ROOT = '/home/gracedb/logs'
......
{% extends "base.html" %}
{% block title %}403 – Forbidden{% endblock %}
{% block heading %}Forbidden {{ object.graceid }}{% endblock %}
{% block content %}
<p>You do not have the required permissions for the requested action.</p>
{{ message|safe }}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment