diff --git a/static/websiteFunctions/websiteFunctions.js b/static/websiteFunctions/websiteFunctions.js index d1f948405..ca0fed440 100644 --- a/static/websiteFunctions/websiteFunctions.js +++ b/static/websiteFunctions/websiteFunctions.js @@ -2830,6 +2830,8 @@ app.controller('manageCronController', function ($scope, $http) { $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); + $scope.websiteToBeModified = $("#domain").text(); + $scope.fetchWebsites = function () { $("#manageCronLoading").show(); @@ -2880,6 +2882,7 @@ app.controller('manageCronController', function ($scope, $http) { $("#cronEditSuccess").hide(); } }; + $scope.fetchWebsites(); $scope.fetchCron = function (cronLine) { @@ -3033,7 +3036,6 @@ app.controller('manageCronController', function ($scope, $http) { } }; - $scope.removeCron = function (line) { $("#manageCronLoading").show(); diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index d1f948405..ca0fed440 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -2830,6 +2830,8 @@ app.controller('manageCronController', function ($scope, $http) { $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); + $scope.websiteToBeModified = $("#domain").text(); + $scope.fetchWebsites = function () { $("#manageCronLoading").show(); @@ -2880,6 +2882,7 @@ app.controller('manageCronController', function ($scope, $http) { $("#cronEditSuccess").hide(); } }; + $scope.fetchWebsites(); $scope.fetchCron = function (cronLine) { @@ -3033,7 +3036,6 @@ app.controller('manageCronController', function ($scope, $http) { } }; - $scope.removeCron = function (line) { $("#manageCronLoading").show(); diff --git a/websiteFunctions/templates/websiteFunctions/listCron.html b/websiteFunctions/templates/websiteFunctions/listCron.html index 44e9a1fd2..e03076a98 100755 --- a/websiteFunctions/templates/websiteFunctions/listCron.html +++ b/websiteFunctions/templates/websiteFunctions/listCron.html @@ -16,27 +16,19 @@

- {% trans "Cron Management" %} + {% trans "Cron Management" %} - {{ domain }}

- -
- -
- -
- - + +
@@ -74,7 +66,6 @@
-
diff --git a/websiteFunctions/templates/websiteFunctions/website.html b/websiteFunctions/templates/websiteFunctions/website.html index 9e9459d46..d28d5a925 100755 --- a/websiteFunctions/templates/websiteFunctions/website.html +++ b/websiteFunctions/templates/websiteFunctions/website.html @@ -272,11 +272,11 @@
- - {% trans "Cron Jobs" %} diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index 32bdb4ec0..082de360c 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -131,9 +131,17 @@ class WebsiteManager: def listCron(self, request=None, userID=None, data=None): try: + currentACL = ACLManager.loadedACL(userID) + admin = Administrator.objects.get(pk=userID) + + if ACLManager.checkOwnership(request.GET.get('domain'), admin, currentACL) == 1: + pass + else: + return ACLManager.loadError() + websitesName = ACLManager.findAllSites(currentACL, userID) - return render(request, 'websiteFunctions/listCron.html', {'websiteList': websitesName}) + return render(request, 'websiteFunctions/listCron.html', {'domain': request.GET.get('domain'), 'websiteList': websitesName}) except BaseException as msg: return HttpResponse(str(msg))