bug fix: pre-auth
This commit is contained in:
parent
5b08cd6d53
commit
1c0c6cbcf7
10
dns/views.py
10
dns/views.py
|
|
@ -245,6 +245,16 @@ def resetDNSnow(request):
|
|||
|
||||
def getresetstatus(request):
|
||||
try:
|
||||
|
||||
userID = request.session['userID']
|
||||
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
|
||||
if currentACL['admin'] == 1:
|
||||
pass
|
||||
else:
|
||||
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
|
||||
|
||||
data = json.loads(request.body)
|
||||
statusfile = data['statusfile']
|
||||
installStatus = ProcessUtilities.outputExecutioner("sudo cat " + statusfile)
|
||||
|
|
|
|||
12
ftp/views.py
12
ftp/views.py
|
|
@ -142,10 +142,22 @@ def resetftpnow(request):
|
|||
|
||||
def getresetstatus(request):
|
||||
try:
|
||||
|
||||
userID = request.session['userID']
|
||||
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
|
||||
if currentACL['admin'] == 1:
|
||||
pass
|
||||
else:
|
||||
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
|
||||
|
||||
data = json.loads(request.body)
|
||||
statusfile = data['statusfile']
|
||||
installStatus = ProcessUtilities.outputExecutioner("sudo cat " + statusfile)
|
||||
|
||||
|
||||
|
||||
if installStatus.find("[200]") > -1:
|
||||
|
||||
command = 'sudo rm -f ' + statusfile
|
||||
|
|
|
|||
Loading…
Reference in New Issue