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):
|
def versionManagment(request):
|
||||||
## Get latest version
|
## 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')
|
getVersion = requests.get('https://cyberpanel.net/version.txt')
|
||||||
latest = getVersion.json()
|
latest = getVersion.json()
|
||||||
latestVersion = latest['version']
|
latestVersion = latest['version']
|
||||||
@@ -179,14 +172,6 @@ def versionManagment(request):
|
|||||||
Currentcomt = output.rstrip("\n")
|
Currentcomt = output.rstrip("\n")
|
||||||
notechk = True
|
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):
|
if (Currentcomt == latestcomit):
|
||||||
notechk = False
|
notechk = False
|
||||||
|
|
||||||
|
|||||||
@@ -201,12 +201,7 @@ def FileManagerRoot(request):
|
|||||||
cosmetic = CyberPanelCosmetic()
|
cosmetic = CyberPanelCosmetic()
|
||||||
cosmetic.save()
|
cosmetic.save()
|
||||||
|
|
||||||
userID = request.session['userID']
|
ipAddressLocal = ACLManager.fetchIP()
|
||||||
currentACL = ACLManager.loadedACL(userID)
|
|
||||||
ipFile = "/etc/cyberpanel/machineIP"
|
|
||||||
f = open(ipFile)
|
|
||||||
ipData = f.read()
|
|
||||||
ipAddressLocal = ipData.split('\n', 1)[0]
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
@@ -232,13 +227,8 @@ def FileManagerRoot(request):
|
|||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
template = 'baseTemplate/FileManager.html'
|
template = 'baseTemplate/FileManager.html'
|
||||||
|
|
||||||
if currentACL['admin'] == 1:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
|
|
||||||
|
|
||||||
from plogical.httpProc import httpProc
|
from plogical.httpProc import httpProc
|
||||||
proc = httpProc(request, template)
|
proc = httpProc(request, template, None, 'admin')
|
||||||
return proc.render()
|
return proc.render()
|
||||||
|
|
||||||
def downloadFile(request):
|
def downloadFile(request):
|
||||||
|
|||||||
Reference in New Issue
Block a user