kstateome / django-cas

K-State's maintained version of django-cas
MIT License
112 stars 83 forks source link

Not redirecting to CAS #56

Closed lujonathanh closed 8 years ago

lujonathanh commented 8 years ago

Hello,

I am running on Django 1.9. Instead of redirecting to the CAS url, I just get the error page. I am attempting to access https://localhost:8000/accounts/login as defined in my urls.py:

Here is my urls.py:

urlpatterns = [
    url(r'^proctors/admin/', admin.site.urls),
    url(r'^coaches/login/$', 'django.contrib.auth.views.login', {'template_name':'loginform.html'}, name='login'),
    url(r'^coaches/', include('registration.urls')),
    url(r'^proctors/', include('grading.urls')),
    url(r'^proctors/progress/$', 'grading.views.progress', name='progress'),
    url(r'^accounts/login/$', 'cas.views.login', name='proctor_login'),
    url(r'^accounts/logout/$', 'cas.views.logout', name='proctor_logout'),
]

"Forbidden

You do not have staff privileges."

Here is my settings.py:

CAS_SERVER_URL = 'https://fed.princeton.edu/cas/'

CAS_RETRY_LOGIN = True

CAS_REDIRECT_URL = '/proctors/'
dstegelman commented 8 years ago

Typically, the Forbidden message crops up when you are authenticated, but don't have staff privileges see this