diff --git a/baseTemplate/static/baseTemplate/custom-js/system-status.js b/baseTemplate/static/baseTemplate/custom-js/system-status.js index 656bc8003..bb03a3148 100644 --- a/baseTemplate/static/baseTemplate/custom-js/system-status.js +++ b/baseTemplate/static/baseTemplate/custom-js/system-status.js @@ -138,6 +138,8 @@ app.controller('adminController', function($scope,$http,$timeout) { $("#packageHome").hide(); $("#packageSub").hide(); $("#createWebsite").hide(); + $("#modifyWebSite").hide(); + $("#deleteWebsite").hide(); } } diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 146fe4b84..720e6d67b 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -333,10 +333,10 @@ diff --git a/plogical/virtualHostUtilities.py b/plogical/virtualHostUtilities.py index 845a1ed44..51d314715 100644 --- a/plogical/virtualHostUtilities.py +++ b/plogical/virtualHostUtilities.py @@ -1315,7 +1315,6 @@ def installJoomla(domainName,finalPath,virtualHostUser,dbName,dbUser,dbPassword, FNULL = open(os.devnull, 'w') - if not os.path.exists(finalPath): os.makedirs(finalPath) @@ -1338,6 +1337,8 @@ def installJoomla(domainName,finalPath,virtualHostUser,dbName,dbUser,dbPassword, ## Get Joomla os.chdir(finalPath) + + if not os.path.exists("staging.zip"): command = 'wget --no-check-certificate https://github.com/joomla/joomla-cms/archive/staging.zip -P ' + finalPath cmd = shlex.split(command) diff --git a/static/baseTemplate/custom-js/system-status.js b/static/baseTemplate/custom-js/system-status.js index 656bc8003..bb03a3148 100644 --- a/static/baseTemplate/custom-js/system-status.js +++ b/static/baseTemplate/custom-js/system-status.js @@ -138,6 +138,8 @@ app.controller('adminController', function($scope,$http,$timeout) { $("#packageHome").hide(); $("#packageSub").hide(); $("#createWebsite").hide(); + $("#modifyWebSite").hide(); + $("#deleteWebsite").hide(); } } diff --git a/websiteFunctions/templates/websiteFunctions/index.html b/websiteFunctions/templates/websiteFunctions/index.html index 148169af7..b28ae845e 100644 --- a/websiteFunctions/templates/websiteFunctions/index.html +++ b/websiteFunctions/templates/websiteFunctions/index.html @@ -41,30 +41,6 @@ - -
- -
- {% trans "Modify Website" %} -
-
- -
-
-
- -
- -
- {% trans "Delete Website" %} -
-
- -
-
-
- - {% else %} diff --git a/websiteFunctions/views.py b/websiteFunctions/views.py index dfd6f2210..8c51c8dde 100644 --- a/websiteFunctions/views.py +++ b/websiteFunctions/views.py @@ -85,6 +85,11 @@ def modifyWebsite(request): try: admin = Administrator.objects.get(pk=request.session['userID']) + if admin.type == 3: + final = {'error': 1, "error_message": "Not enough privilege"} + final_json = json.dumps(final) + return HttpResponse(final_json) + if admin.type == 1: websites = Websites.objects.all() websitesName = [] @@ -126,6 +131,11 @@ def deleteWebsite(request): try: admin = Administrator.objects.get(pk=request.session['userID']) + if admin.type == 3: + final = {'error': 1, "error_message": "Not enough privilege"} + final_json = json.dumps(final) + return HttpResponse(final_json) + if admin.type == 1: websites = Websites.objects.all() websitesName = []