eed3653d22
Whenever a user logs in through CAS, their username is looked up in the .rhosts file provided through settings. If it is found, the user is granted staff status and BOcal group (cf fixture). The rights are re-evaluated at each login and at each access to /admin/login. Close #2.
11 lines
277 B
Python
11 lines
277 B
Python
from django.db import models
|
|
from django.contrib.auth.models import User
|
|
|
|
|
|
class CasUser(models.Model):
|
|
''' Describes a Django user that was created through CAS '''
|
|
|
|
user = models.OneToOneField(
|
|
User,
|
|
on_delete=models.CASCADE,
|
|
primary_key=True)
|