mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
bug fix while creating email
This commit is contained in:
@@ -952,7 +952,7 @@ class preFlightsChecks:
|
|||||||
|
|
||||||
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',
|
||||||
@@ -961,7 +961,7 @@ class preFlightsChecks:
|
|||||||
##
|
##
|
||||||
|
|
||||||
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)
|
||||||
@@ -1053,8 +1053,8 @@ class preFlightsChecks:
|
|||||||
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
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -92,12 +92,14 @@ class MailServerManager:
|
|||||||
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)
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -440,14 +440,11 @@ class cPanelImporter:
|
|||||||
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)
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ from processUtilities import ProcessUtilities
|
|||||||
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
|
||||||
@@ -113,7 +115,7 @@ class mailUtilities:
|
|||||||
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:
|
||||||
|
|||||||
8
static/backup/backup.js
Executable file → Normal file
8
static/backup/backup.js
Executable file → Normal file
@@ -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();
|
||||||
|
|
||||||
@@ -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 () {
|
||||||
@@ -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 = {
|
||||||
|
|||||||
976
static/dns/dns.js
Executable file → Normal file
976
static/dns/dns.js
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@@ -788,7 +788,6 @@ app.controller('viewContainer', function ($scope, $http) {
|
|||||||
|
|
||||||
$scope.cAction = function (action) {
|
$scope.cAction = function (action) {
|
||||||
$('#actionLoading').show();
|
$('#actionLoading').show();
|
||||||
console.log($scope.cName)
|
|
||||||
url = "/docker/doContainerAction";
|
url = "/docker/doContainerAction";
|
||||||
var data = {name: $scope.cName, action: action};
|
var data = {name: $scope.cName, action: action};
|
||||||
var config = {
|
var config = {
|
||||||
|
|||||||
@@ -231,37 +231,10 @@ $("#listFail").hide();
|
|||||||
app.controller('listWebsites', function ($scope, $http) {
|
app.controller('listWebsites', function ($scope, $http) {
|
||||||
|
|
||||||
|
|
||||||
url = "/websites/submitWebsiteListing";
|
$scope.currentPage = 1;
|
||||||
|
$scope.recordsToShow = 10;
|
||||||
|
|
||||||
var data = {page: 1};
|
$scope.getFurtherWebsitesFromDB = function () {
|
||||||
|
|
||||||
var config = {
|
|
||||||
headers: {
|
|
||||||
'X-CSRFToken': getCookie('csrftoken')
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
|
|
||||||
|
|
||||||
|
|
||||||
function ListInitialData(response) {
|
|
||||||
|
|
||||||
if (response.data.listWebSiteStatus === 1) {
|
|
||||||
var finalData = JSON.parse(response.data.data);
|
|
||||||
$scope.WebSitesList = finalData;
|
|
||||||
$scope.pagination = response.data.pagination;
|
|
||||||
$("#listFail").hide();
|
|
||||||
} else {
|
|
||||||
$("#listFail").fadeIn();
|
|
||||||
$scope.errorMessage = response.data.error_message;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function cantLoadInitialData(response) {
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.getFurtherWebsitesFromDB = function (pageNumber) {
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -269,10 +242,13 @@ app.controller('listWebsites', function ($scope, $http) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var data = {page: pageNumber};
|
var data = {
|
||||||
|
page: $scope.currentPage,
|
||||||
|
recordsToShow: $scope.recordsToShow
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
dataurl = "/websites/submitWebsiteListing";
|
dataurl = "/websites/fetchWebsitesList";
|
||||||
|
|
||||||
$http.post(dataurl, data, config).then(ListInitialData, cantLoadInitialData);
|
$http.post(dataurl, data, config).then(ListInitialData, cantLoadInitialData);
|
||||||
|
|
||||||
@@ -280,8 +256,9 @@ app.controller('listWebsites', function ($scope, $http) {
|
|||||||
function ListInitialData(response) {
|
function ListInitialData(response) {
|
||||||
if (response.data.listWebSiteStatus === 1) {
|
if (response.data.listWebSiteStatus === 1) {
|
||||||
|
|
||||||
var finalData = JSON.parse(response.data.data);
|
$scope.WebSitesList = JSON.parse(response.data.data);
|
||||||
$scope.WebSitesList = finalData;
|
$scope.pagination = response.data.pagination;
|
||||||
|
$scope.clients = JSON.parse(response.data.data);
|
||||||
$("#listFail").hide();
|
$("#listFail").hide();
|
||||||
} else {
|
} else {
|
||||||
$("#listFail").fadeIn();
|
$("#listFail").fadeIn();
|
||||||
@@ -291,11 +268,11 @@ app.controller('listWebsites', function ($scope, $http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialData(response) {
|
function cantLoadInitialData(response) {
|
||||||
console.log("not good");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
$scope.getFurtherWebsitesFromDB();
|
||||||
|
|
||||||
$scope.cyberPanelLoading = true;
|
$scope.cyberPanelLoading = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user