mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-29 11:44:28 +01:00
@@ -118,6 +118,9 @@ class User(PermissionsMixin):
|
||||
raise PermDeniedException
|
||||
|
||||
owner = get_object_owner(self)
|
||||
if owner == self:
|
||||
# The default admin is being removed...
|
||||
owner = fromuser
|
||||
for ooentry in self.objectaccess_set.filter(is_owner=True):
|
||||
if ooentry.content_object is not None:
|
||||
grant_access_to_object(owner, ooentry.content_object, True)
|
||||
|
||||
Reference in New Issue
Block a user