diff --git a/plogical/acl.py b/plogical/acl.py index ea3bd19ca..ed4f0c816 100644 --- a/plogical/acl.py +++ b/plogical/acl.py @@ -673,6 +673,7 @@ class ACLManager: @staticmethod def checkOwnership(domain, admin, currentACL): + try: childDomain = ChildDomains.objects.get(domain=domain) diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index 314bf7785..82843b9e6 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -348,6 +348,7 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $ $scope.goBackDisable = true; $("#installProgress").css("width", "0%"); }; + function getCreationStatus() { url = "/websites/installWordpressStatus"; @@ -385,8 +386,7 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $ $scope.currentStatus = response.data.currentStatus; $timeout.cancel(); - } - else { + } else { $scope.webSiteCreationLoading = true; $scope.installationDetailsForm = true; @@ -433,16 +433,19 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $ }); - //........... delete wp list var FurlDeleteWP; -function DeleteWPNow(url) { -FurlDeleteWP = url; + +function DeleteWPNow(url) { + FurlDeleteWP = url; } + function FinalDeleteWPNow() { - window.location.href = FurlDeleteWP; + window.location.href = FurlDeleteWP; } + app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $window) { + $scope.wordpresshomeloading = true; $scope.stagingDetailsForm = false; $scope.installationProgress = true; @@ -501,7 +504,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } } else { - new PNotify({ + new PNotify({ title: 'Operation Failed!', text: response.data.error_message, type: 'error' @@ -587,7 +590,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo }; - $scope.GetCurrentPlugins = function () { $('#wordpresshomeloading').show(); @@ -641,7 +643,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo }; - $scope.GetCurrentThemes = function () { $('#wordpresshomeloading').show(); @@ -1032,7 +1033,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo }; - function AddThemes(value, index, array) { var FinalMarkup = '' FinalMarkup = FinalMarkup + ''; @@ -1062,20 +1062,20 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo $scope.CreateStagingNow = function () { $('#wordpresshomeloading').show(); - $scope.wordpresshomeloading = false; - $scope.stagingDetailsForm = true; - $scope.installationProgress = false; - $scope.errorMessageBox = true; - $scope.success = true; - $scope.couldNotConnect = true; - $scope.goBackDisable = true; + $scope.wordpresshomeloading = false; + $scope.stagingDetailsForm = true; + $scope.installationProgress = false; + $scope.errorMessageBox = true; + $scope.success = true; + $scope.couldNotConnect = true; + $scope.goBackDisable = true; - $scope.currentStatus = "Starting creation Staging.."; + $scope.currentStatus = "Starting creation Staging.."; var data = { StagingName: $('#stagingName').val(), StagingDomain: $('#stagingDomain').val(), - WPid: $('#WPid').html(), + WPid: $('#WPid').html(), } var url = "/websites/CreateStagingNow"; @@ -1092,7 +1092,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo function ListInitialDatas(response) { $('#wordpresshomeloading').hide(); if (response.data.status === 1) { - statusFile = response.data.tempStatusPath; + statusFile = response.data.tempStatusPath; getCreationStatus(); } else { new PNotify({ @@ -1182,7 +1182,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } function cantLoadInitialDatas(response) { - $('#wordpresshomeloading').hide(); + $('#wordpresshomeloading').hide(); $scope.wordpresshomeloading = true; $scope.stagingDetailsForm = true; $scope.installationProgress = false; @@ -1197,7 +1197,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } $scope.goBack = function () { - $('#wordpresshomeloading').hide(); + $('#wordpresshomeloading').hide(); $scope.wordpresshomeloading = true; $scope.stagingDetailsForm = false; $scope.installationProgress = true; @@ -1209,7 +1209,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo }; $scope.fetchstaging = function () { - $('#wordpresshomeloading').show(); + $('#wordpresshomeloading').show(); $scope.wordpresshomeloading = false; var url = "/websites/fetchstaging"; @@ -1230,7 +1230,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo function ListInitialDatas(response) { wordpresshomeloading = true; - $('#wordpresshomeloading').hide(); + $('#wordpresshomeloading').hide(); if (response.data.status === 1) { @@ -1250,23 +1250,15 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } function cantLoadInitialDatas(response) { - $('#wordpresshomeloading').hide(); - alert("Error"+response) + $('#wordpresshomeloading').hide(); + alert("Error" + response) } }; - - $scope.autoLogin = function () { - var url = "/websites/DeleteThemes"; - //window.open("/wpmanager/" + $('#HostingCompanyID').html() + "/manage/" + server + "/" + wordpress + "/AutoLogin"); - var WPid = $('#WPid').html(); - window.open("/websites/AutoLogin?WordPressID="+sub.id); - } - - $scope.SaveUpdateConfig =function () { - $('#wordpresshomeloading').show(); + $scope.SaveUpdateConfig = function () { + $('#wordpresshomeloading').show(); var data = { AutomaticUpdates: $('#AutomaticUpdates').find(":selected").text(), Plugins: $('#Plugins').find(":selected").text(), @@ -1289,7 +1281,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo function ListInitialDatas(response) { - $('#wordpresshomeloading').hide(); + $('#wordpresshomeloading').hide(); $scope.wordpresshomeloading = true; if (response.data.status === 1) { @@ -1298,7 +1290,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo text: 'Update Configurations Sucessfully!.', type: 'success' }); - $("#autoUpdateConfig").modal('hide'); + $("#autoUpdateConfig").modal('hide'); } else { new PNotify({ title: 'Operation Failed!', @@ -1311,18 +1303,27 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } function cantLoadInitialDatas(response) { - $('#wordpresshomeloading').hide(); - new PNotify({ - title: 'Operation Failed!', - text: response, - type: 'error' - }); + $('#wordpresshomeloading').hide(); + new PNotify({ + title: 'Operation Failed!', + text: response, + type: 'error' + }); } }; + var DeploytoProductionID; + + function DeployToProductionInitial(vall) { + DeploytoProductionID = vall; + } + + function FinalDeployToProduction() { + alert($('#WPid').html()); + alert(DeploytoProductionID); + return 0; - FinalDeployToProduction = function () { $('#wordpresshomeloading').show(); $('#DeployToProduction').modal('hide'); var data = { @@ -1343,7 +1344,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo function ListInitialDatas(response) { - $('#wordpresshomeloading').hide(); + $('#wordpresshomeloading').hide(); if (response.data.status === 1) { new PNotify({ title: 'Success!', @@ -1365,29 +1366,25 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } function cantLoadInitialDatas(response) { - $('#wordpresshomeloading').hide(); - new PNotify({ - title: 'Operation Failed!', - text: response, - type: 'error' - }); + $('#wordpresshomeloading').hide(); + new PNotify({ + title: 'Operation Failed!', + text: response, + type: 'error' + }); } - }; + } }); -var DeploytoProductionID; -function DeployToProductionInitial(vall){ - DeploytoProductionID=vall; -} function AddStagings(value, index, array) { var FinalMarkup = '' for (let x in value) { if (x === 'name') { - FinalMarkup = FinalMarkup + '' + value[x] + ''; + FinalMarkup = FinalMarkup + '' + value[x] + ''; } else if (x !== 'url' && x !== 'deleteURL' && x !== 'id') { FinalMarkup = FinalMarkup + '' + value[x] + ""; } diff --git a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html index bd8767a22..d477d5394 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html +++ b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html @@ -304,7 +304,7 @@ -
+
diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index d97e00370..7669f9f6f 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -672,11 +672,6 @@ class WebsiteManager: extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999)) - if ACLManager.checkOwnership(wpsite.owner.domain, admin, currentACL) == 1: - pass - else: - return ACLManager.loadError() - background = ApplicationInstaller('CreateStagingNow', extraArgs) background.start()