Skip to content
Permalink
Browse files

bug fix while creating email

  • Loading branch information...
usmannasir committed Aug 25, 2019
1 parent cbf4f2f commit a5bf6ca60adc4c6a471e29e12c1562682701f5f3
@@ -952,7 +952,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):

os.chdir(self.path)

command = "wget http://cyberpanel.sh/CyberPanel.1.8.9.tar.gz"
command = "wget http://cyberpanel.sh/CyberPanel.1.9.0.tar.gz"
#command = "wget http://cyberpanel.sh/CyberPanelTemp.tar.gz"
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
'CyberPanel Download',
@@ -961,7 +961,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
##

count = 0
command = "tar zxf CyberPanel.1.8.9.tar.gz"
command = "tar zxf CyberPanel.1.9.0.tar.gz"
#command = "tar zxf CyberPanelTemp.tar.gz"
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
'Extract CyberPanel',1, 1, os.EX_OSERR)
@@ -1053,8 +1053,8 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
try:
path = "/usr/local/CyberCP/version.txt"
writeToFile = open(path, 'w')
writeToFile.writelines('1.8\n')
writeToFile.writelines('9')
writeToFile.writelines('1.9\n')
writeToFile.writelines('0')
writeToFile.close()
except:
pass
@@ -218,7 +218,7 @@ def loadLoginPage(request):
firstName="Cyber",lastName="Panel", acl=acl, token=token)
admin.save()

vers = version(currentVersion="1.8", build=9)
vers = version(currentVersion="1.9", build=0)
vers.save()

package = Package(admin=admin, packageName="Default", diskSpace=1000,
@@ -92,12 +92,14 @@ def submitEmailCreation(self):
userName = data['username']
password = data['passwordByPass']


admin = Administrator.objects.get(pk=userID)
if ACLManager.checkOwnership(domainName, admin, currentACL) == 1:
pass
else:
return ACLManager.loadErrorJson()


## Create email entry

result = mailUtilities.createEmailAccount(domainName, userName, password)
@@ -31,7 +31,7 @@ def main():
firstName="Cyber", lastName="Panel", acl=acl, token=token)
admin.save()

vers = version(currentVersion="1.8", build=9)
vers = version(currentVersion="1.9", build=0)
vers.save()

package = Package(admin=admin, packageName="Default", diskSpace=1000,
@@ -440,14 +440,11 @@ def CreateChildDomains(self):
movePath = '%s/homedir/public_html/%s' % (
CompletPathToExtractedArchive, ChildDocRoot.replace(self.documentRoot, '', 1).replace('/', ''))

print movePath

if os.path.exists(movePath):
shutil.move(movePath, path)
else:
movePath = '%s/homedir/%s' % (
CompletPathToExtractedArchive, ChildDocRoot.split('/')[-1].replace(self.documentRoot, '', 1).replace('/', ''))
print movePath
shutil.move(movePath, path)

command = 'chown -R %s:%s %s' % (externalApp, externalApp, path)
@@ -16,6 +16,8 @@
import os, getpass
import hashlib
import bcrypt
import getpass

try:
from mailServer.models import Domains, EUsers
from emailPremium.models import DomainLimits, EmailLimits
@@ -113,7 +115,7 @@ def createEmailAccount(domain, userName, password):
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/mailUtilities.py"
execPath = execPath + " AfterEffects --domain " + domain

if os.getlogin() == 'root':
if getpass.getuser() == 'root':
## This is the case when cPanel Importer is running and token is not present in enviroment.
ProcessUtilities.normalExecutioner(execPath)
else:
8 static/backup/backup.js 100755 → 100644
@@ -680,6 +680,7 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
$scope.couldNotConnect = true;
$scope.scheduleFreq = true;
$scope.scheduleBtn = true;
$scope.localPath = true;

populateCurrentRecords();

@@ -691,6 +692,12 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
$scope.scheduleFreq = false;
$scope.scheduleBtn = true;

if($scope.backupDest === 'Home'){
$scope.localPath = false;
}else{
$scope.localPath = true;
}

};

$scope.scheduleBtnView = function () {
@@ -719,6 +726,7 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
var data = {
backupDest: $scope.backupDest,
backupFreq: $scope.backupFreq,
localPath: $scope.localPathValue
};

var config = {

0 comments on commit a5bf6ca

Please sign in to comment.
You can’t perform that action at this time.