mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
security fix: CP-10: Admin Websites Suspend / Unsuspend
This commit is contained in:
@@ -574,6 +574,12 @@ class WebsiteManager:
|
|||||||
|
|
||||||
website = Websites.objects.get(domain=websiteName)
|
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":
|
if state == "Suspend":
|
||||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + websiteName
|
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + websiteName
|
||||||
command = "mv " + confPath + " " + confPath + "-suspended"
|
command = "mv " + confPath + " " + confPath + "-suspended"
|
||||||
|
|||||||
Reference in New Issue
Block a user