X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/0dd89aae9312bb35ea3398bc9cbf4312ac8d5003..76fc5b2671d4c445e57236a5b1d54e56fe49764a:/src/accounts/models.py?ds=sidebyside diff --git a/src/accounts/models.py b/src/accounts/models.py index c9aaec6..b0be8d4 100644 --- a/src/accounts/models.py +++ b/src/accounts/models.py @@ -1,21 +1,11 @@ -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', ) - - def user_attributes(sender, user, **kwargs): return { 'firstname': user.first_name, 'lastname': user.last_name, + 'cn': ' '.join((user.first_name, user.last_name)), 'email': user.email, } cas_collect_custom_attributes.connect(user_attributes)