bug fix: load main page data

This commit is contained in:
Usman Nasir
2022-04-20 16:31:24 +05:00
parent a1ae890b5b
commit 88b4d20f0a
2 changed files with 22 additions and 7 deletions

View File

@@ -514,9 +514,9 @@ app.controller('homePageStatus', function ($scope, $http, $timeout) {
$scope.two = response.data.two;
$scope.three = response.data.three;
document.getElementById("load1").innerHTML = $scope.one;
document.getElementById("load2").innerHTML = $scope.two;
document.getElementById("load3").innerHTML = $scope.three;
//document.getElementById("load1").innerHTML = $scope.one;
//document.getElementById("load2").innerHTML = $scope.two;
//document.getElementById("load3").innerHTML = $scope.three;
}
function cantGetLoadAvgData(response) {

View File

@@ -104,12 +104,27 @@ def controller(request):
admin = Administrator.objects.get(pk=userID)
currentACL = ACLManager.loadedACL(userID)
if domainName == '':
if currentACL['admin'] == 1:
pass
else:
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
else:
if ACLManager.checkOwnership(domainName, admin, currentACL) == 1:
pass
else:
return ACLManager.loadErrorJson()
except:
print("habbi")
method = data['method']
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
if currentACL['admin'] == 1:
pass
else:
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
fm = FM(request, data)
if method == 'listForTable':