LIST USERS should also be available from the /users/ page.

This commit is contained in:
Usman Nasir
2019-08-17 02:11:08 +05:00
parent afdbc36df5
commit eb30f37f50
2 changed files with 90 additions and 68 deletions

View File

@@ -18,7 +18,12 @@ def loadUserHome(request):
val = request.session['userID']
try:
admin = Administrator.objects.get(pk=val)
return render(request, 'userManagment/index.html', {"type": admin.type})
currentACL = ACLManager.loadedACL(val)
if currentACL['admin'] == 1:
listUsers = 1
else:
listUsers = currentACL['listUsers']
return render(request, 'userManagment/index.html', {"type": admin.type, 'listUsers': listUsers})
except BaseException, msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg))
return HttpResponse(str(msg))