mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 15:56:11 +01:00
bug fix: login on vm and fm
This commit is contained in:
@@ -151,13 +151,6 @@ def getLoadAverage(request):
|
||||
def versionManagment(request):
|
||||
## Get latest version
|
||||
|
||||
val = request.session['userID']
|
||||
currentACL = ACLManager.loadedACL(val)
|
||||
if currentACL['admin'] == 1:
|
||||
pass
|
||||
else:
|
||||
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
|
||||
|
||||
getVersion = requests.get('https://cyberpanel.net/version.txt')
|
||||
latest = getVersion.json()
|
||||
latestVersion = latest['version']
|
||||
@@ -179,14 +172,6 @@ def versionManagment(request):
|
||||
Currentcomt = output.rstrip("\n")
|
||||
notechk = True
|
||||
|
||||
# command ="git fetch -C /usr/local/CyberCP/"
|
||||
# output = ProcessUtilities.outputExecutioner(command)
|
||||
#
|
||||
# command ="git -C /usr/local/CyberCP/ log %s..%s --pretty=oneline | wc -l" % ( Currentcomt, latestcomit)
|
||||
# output = ProcessUtilities.outputExecutioner(command)
|
||||
#
|
||||
# numCommits = output.rstrip("\n")
|
||||
|
||||
if (Currentcomt == latestcomit):
|
||||
notechk = False
|
||||
|
||||
|
||||
@@ -201,12 +201,7 @@ def FileManagerRoot(request):
|
||||
cosmetic = CyberPanelCosmetic()
|
||||
cosmetic.save()
|
||||
|
||||
userID = request.session['userID']
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
ipFile = "/etc/cyberpanel/machineIP"
|
||||
f = open(ipFile)
|
||||
ipData = f.read()
|
||||
ipAddressLocal = ipData.split('\n', 1)[0]
|
||||
ipAddressLocal = ACLManager.fetchIP()
|
||||
|
||||
try:
|
||||
|
||||
@@ -232,13 +227,8 @@ def FileManagerRoot(request):
|
||||
except BaseException as msg:
|
||||
template = 'baseTemplate/FileManager.html'
|
||||
|
||||
if currentACL['admin'] == 1:
|
||||
pass
|
||||
else:
|
||||
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
|
||||
|
||||
from plogical.httpProc import httpProc
|
||||
proc = httpProc(request, template)
|
||||
proc = httpProc(request, template, None, 'admin')
|
||||
return proc.render()
|
||||
|
||||
def downloadFile(request):
|
||||
|
||||
Reference in New Issue
Block a user