Skip to content

Commit

Permalink
bug fix while creating email
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Aug 25, 2019
1 parent cbf4f2f commit a5bf6ca
Show file tree
Hide file tree
Showing 10 changed files with 486 additions and 471 deletions.
8 changes: 4 additions & 4 deletions install/install.py
Expand Up @@ -952,7 +952,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):


os.chdir(self.path) 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" #command = "wget http://cyberpanel.sh/CyberPanelTemp.tar.gz"
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]', preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
'CyberPanel Download', 'CyberPanel Download',
Expand All @@ -961,7 +961,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
## ##


count = 0 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" #command = "tar zxf CyberPanelTemp.tar.gz"
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]', preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
'Extract CyberPanel',1, 1, os.EX_OSERR) 'Extract CyberPanel',1, 1, os.EX_OSERR)
Expand Down Expand Up @@ -1053,8 +1053,8 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
try: try:
path = "/usr/local/CyberCP/version.txt" path = "/usr/local/CyberCP/version.txt"
writeToFile = open(path, 'w') writeToFile = open(path, 'w')
writeToFile.writelines('1.8\n') writeToFile.writelines('1.9\n')
writeToFile.writelines('9') writeToFile.writelines('0')
writeToFile.close() writeToFile.close()
except: except:
pass pass
Expand Down
2 changes: 1 addition & 1 deletion loginSystem/views.py
Expand Up @@ -218,7 +218,7 @@ def loadLoginPage(request):
firstName="Cyber",lastName="Panel", acl=acl, token=token) firstName="Cyber",lastName="Panel", acl=acl, token=token)
admin.save() admin.save()


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


package = Package(admin=admin, packageName="Default", diskSpace=1000, package = Package(admin=admin, packageName="Default", diskSpace=1000,
Expand Down
2 changes: 2 additions & 0 deletions mailServer/mailserverManager.py
Expand Up @@ -92,12 +92,14 @@ def submitEmailCreation(self):
userName = data['username'] userName = data['username']
password = data['passwordByPass'] password = data['passwordByPass']



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



## Create email entry ## Create email entry


result = mailUtilities.createEmailAccount(domainName, userName, password) result = mailUtilities.createEmailAccount(domainName, userName, password)
Expand Down
2 changes: 1 addition & 1 deletion plogical/adminPass.py
Expand Up @@ -31,7 +31,7 @@ def main():
firstName="Cyber", lastName="Panel", acl=acl, token=token) firstName="Cyber", lastName="Panel", acl=acl, token=token)
admin.save() admin.save()


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


package = Package(admin=admin, packageName="Default", diskSpace=1000, package = Package(admin=admin, packageName="Default", diskSpace=1000,
Expand Down
3 changes: 0 additions & 3 deletions plogical/cPanelImporter.py
Expand Up @@ -440,14 +440,11 @@ def CreateChildDomains(self):
movePath = '%s/homedir/public_html/%s' % ( movePath = '%s/homedir/public_html/%s' % (
CompletPathToExtractedArchive, ChildDocRoot.replace(self.documentRoot, '', 1).replace('/', '')) CompletPathToExtractedArchive, ChildDocRoot.replace(self.documentRoot, '', 1).replace('/', ''))


print movePath

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


command = 'chown -R %s:%s %s' % (externalApp, externalApp, path) command = 'chown -R %s:%s %s' % (externalApp, externalApp, path)
Expand Down
4 changes: 3 additions & 1 deletion plogical/mailUtilities.py
Expand Up @@ -16,6 +16,8 @@
import os, getpass import os, getpass
import hashlib import hashlib
import bcrypt import bcrypt
import getpass

try: try:
from mailServer.models import Domains, EUsers from mailServer.models import Domains, EUsers
from emailPremium.models import DomainLimits, EmailLimits from emailPremium.models import DomainLimits, EmailLimits
Expand Down Expand Up @@ -113,7 +115,7 @@ def createEmailAccount(domain, userName, password):
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/mailUtilities.py" execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/mailUtilities.py"
execPath = execPath + " AfterEffects --domain " + domain 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. ## This is the case when cPanel Importer is running and token is not present in enviroment.
ProcessUtilities.normalExecutioner(execPath) ProcessUtilities.normalExecutioner(execPath)
else: else:
Expand Down
8 changes: 8 additions & 0 deletions static/backup/backup.js 100755 → 100644
Expand Up @@ -680,6 +680,7 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
$scope.couldNotConnect = true; $scope.couldNotConnect = true;
$scope.scheduleFreq = true; $scope.scheduleFreq = true;
$scope.scheduleBtn = true; $scope.scheduleBtn = true;
$scope.localPath = true;


populateCurrentRecords(); populateCurrentRecords();


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


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

}; };


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


var config = { var config = {
Expand Down

0 comments on commit a5bf6ca

Please sign in to comment.