Fix unit tests.

see #825
This commit is contained in:
Antoine Nguyen
2016-01-19 18:09:35 +01:00
parent b3bbda39df
commit d44c843e66
+3 -1
View File
@@ -266,12 +266,14 @@ class Mailbox(AdminObject):
not self.user.has_perm("admin.add_domain")
)
if all(conditions):
# A super user is creating a new mailbox. Give
# An admin is creating a new mailbox. Give
# access to that mailbox (and the associated
# account) to the appropriate domain admins,
# except if the new account has a more important
# role (SuperAdmin, Reseller)
for admin in self.domain.admins:
if admin == creator:
continue
grant_access_to_object(admin, self)
grant_access_to_object(admin, self.user)