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 = [
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.staticfiles',
'gracedb',
'userprofile',
'ligoauth',
'rest_framework',
'south',
# 'debug_toolbar',
)
#INSTALLED_APPS = (
# 'django.contrib.auth',
# 'django.contrib.admin',
# 'django.contrib.contenttypes',
# 'django.contrib.sessions',
# 'django.contrib.sites',
# 'django.contrib.staticfiles',
# 'gracedb',
# 'userprofile',
# 'ligoauth',
# 'rest_framework',
# 'south',
## 'debug_toolbar',
#)
#INTERNAL_IPS = (
# '129.89.61.55',
......
......@@ -183,8 +183,12 @@ AUTHENTICATION_BACKENDS = (
# 'ligoauth.middleware.auth.RemoteUserBackend',
# 'ligodjangoauth.LigoShibbolethAuthBackend',
# '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'
# If these are left at default, when the Shibboleth middleware
......@@ -227,6 +231,7 @@ INSTALLED_APPS = (
'ligoauth',
'rest_framework',
'south',
'guardian',
)
REST_FRAMEWORK = {
......@@ -244,6 +249,11 @@ STATICFILES_FINDERS = (
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.
import logging
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