www-bocal/bocal_auth/models.py
Théophile Bastian eed3653d22 Use rhosts file to grant permissions to users.
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.
2017-10-14 19:36:13 +02:00

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)