security fix: CP-10: Admin Websites Suspend / Unsuspend

This commit is contained in:
Usman Nasir
2021-08-02 11:55:43 +05:00
parent ad900bd771
commit 1c0826c1a3

View File

@@ -574,6 +574,12 @@ class WebsiteManager:
website = Websites.objects.get(domain=websiteName)
admin = Administrator.objects.get(pk=userID)
if ACLManager.checkOwnership(websiteName, admin, currentACL) == 1:
pass
else:
return ACLManager.loadErrorJson('websiteStatus', 0)
if state == "Suspend":
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + websiteName
command = "mv " + confPath + " " + confPath + "-suspended"