X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/3a65fcbfa423d5627e41c2f9e17c464d4a594087..efd1292d83f2371cba42a41a9480963acd5dd5bc:/src/accounts/models.py?ds=inline diff --git a/src/accounts/models.py b/src/accounts/models.py index b0bd496..b0be8d4 100644 --- a/src/accounts/models.py +++ b/src/accounts/models.py @@ -1,28 +1,6 @@ -from django.conf import settings -from django.db import models from cas_provider.signals import cas_collect_custom_attributes -class Service(models.Model): - ordering = models.IntegerField() - name = models.CharField(max_length=255) - url = models.URLField() - image = models.ImageField(upload_to='accounts/service/') - - class Meta: - ordering = ('ordering', ) - - -class ServiceUser(models.Model): - service = models.ForeignKey(Service, on_delete=models.CASCADE) - user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) - - -class ServiceGroup(models.Model): - service = models.ForeignKey(Service, on_delete=models.CASCADE) - group = models.ForeignKey('auth.Group', on_delete=models.CASCADE) - - def user_attributes(sender, user, **kwargs): return { 'firstname': user.first_name,