# 63 Refactoring

* refactors django User model to custom User model to provide further attributes and methods directly on the user model
This commit is contained in:
2022-01-12 12:56:22 +01:00
parent 37fffd639f
commit 02970b19b4
32 changed files with 174 additions and 136 deletions

View File

@@ -10,7 +10,7 @@ import uuid
from abc import abstractmethod
from django.contrib import messages
from django.contrib.auth.models import User
from user.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpRequest
from django.utils.timezone import now
@@ -411,6 +411,11 @@ class ShareableObjectMixin(models.Model):
users = User.objects.filter(
id__in=accessing_users
)
removed_users = self.users.all().exclude(
id__in=accessing_users
)
for user in removed_users:
user.send_mail_shared_access_removed(self)
self.share_with_list(users)