bug fix: improve size for smtphost

This commit is contained in:
Usman Nasir
2020-09-15 09:35:55 +05:00
parent 6e076aac5e
commit 935293621f
4 changed files with 52 additions and 5 deletions

View File

@@ -62,13 +62,30 @@ class CloudManager:
try:
try:
selectedACL = ACL.objects.get(name='user')
UserAccountName = self.data['UserAccountName']
UserPassword = self.data['UserPassword']
FullName = self.data['FullName']
token = hashPassword.generateToken(UserAccountName, UserPassword)
password = hashPassword.hash_password(UserPassword)
try:
initWebsitesLimit = int(self.data['websitesLimit'])
except:
initWebsitesLimit = 10
try:
acl = self.data['acl']
selectedACL = ACL.objects.get(name=acl)
except:
selectedACL = ACL.objects.get(name='user')
try:
apiAccess = int(self.data['api'])
except:
apiAccess = 10
try:
newAdmin = Administrator(firstName=FullName,
lastName="",
@@ -76,10 +93,11 @@ class CloudManager:
type=3,
userName=UserAccountName,
password=password,
initWebsitesLimit=10,
initWebsitesLimit=initWebsitesLimit,
owner=1,
acl=selectedACL,
token=token
token=token,
api=apiAccess
)
newAdmin.save()
except BaseException as msg: