c836f642fa
This avoid the weird double username situation where we want to give the users the choice of their displayed name but at the same time we need them to never change their CAS username. Now CAS matches on email so we do not have problems.
7 lines
260 B
Python
7 lines
260 B
Python
from django_cas_ng.backends import CASBackend as DjangoCasNgBackend
|
|
|
|
|
|
class CasBackend(DjangoCasNgBackend):
|
|
def clean_username(self, username):
|
|
# We need to build an email out of the CAS username
|
|
return username.lower() + "@clipper.ens.fr"
|