# 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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user