2017-10-14 16:57:59 +02:00
|
|
|
from django_cas_ng.backends import CASBackend
|
2017-10-14 19:36:13 +02:00
|
|
|
from .models import CasUser
|
|
|
|
from . import rhosts
|
2017-10-14 16:57:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
class BOcalCASBackend(CASBackend):
|
|
|
|
# Partly from Robin Champenois's "ExperiENS". Thanks!
|
|
|
|
def clean_username(self, username):
|
|
|
|
return username.lower().strip()
|
2017-10-14 19:36:13 +02:00
|
|
|
|
|
|
|
def configure_user(self, user):
|
|
|
|
casUser = CasUser(user=user)
|
|
|
|
casUser.save()
|