mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
@@ -360,7 +360,7 @@ class User(PermissionsMixin):
|
||||
self.password = row[2].strip()
|
||||
self.first_name = row[3].strip()
|
||||
self.last_name = row[4].strip()
|
||||
self.is_active = (row[5].strip() == 'True')
|
||||
self.is_active = (row[5].strip() in ["True", "1", "yes", "y"])
|
||||
self.save(creator=user)
|
||||
self.set_role(role)
|
||||
if len(row) < 8:
|
||||
|
||||
@@ -166,7 +166,7 @@ class Alias(AdminObject):
|
||||
raise Conflict
|
||||
self.address = localpart
|
||||
self.domain = domain
|
||||
self.enabled = (row[2].strip() == 'True')
|
||||
self.enabled = (row[2].strip() in ["True", "1", "yes", "y"])
|
||||
int_rcpts = []
|
||||
ext_rcpts = []
|
||||
for rcpt in row[3:]:
|
||||
|
||||
@@ -158,7 +158,7 @@ class Domain(AdminObject):
|
||||
self.quota = int(row[2].strip())
|
||||
except ValueError:
|
||||
raise BadRequest(_("Invalid quota value for domain '%s'" % self.name))
|
||||
self.enabled = (row[3].strip() == 'True')
|
||||
self.enabled = (row[3].strip() in ["True", "1", "yes", "y"])
|
||||
self.save(creator=user)
|
||||
|
||||
def to_csv(self, csvwriter):
|
||||
|
||||
@@ -50,7 +50,7 @@ class DomainAlias(AdminObject):
|
||||
self.target = Domain.objects.get(name=domname)
|
||||
except Domain.DoesNotExist:
|
||||
raise BadRequest(_("Unknown domain %s" % domname))
|
||||
self.enabled = row[3].strip() == 'True'
|
||||
self.enabled = row[3].strip() in ["True", "1", "yes", "y"]
|
||||
self.save(creator=user)
|
||||
|
||||
def to_csv(self, csvwriter):
|
||||
|
||||
Reference in New Issue
Block a user