Skip to content
Permalink
Browse files
list user: ref #335
  • Loading branch information
usmannasir committed Jun 1, 2020
1 parent 461f482 commit 6e4c4e13e789632952dfadc0f973df583a9fc3e9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
@@ -1396,6 +1396,17 @@ def main():

print(response.content.decode())

elif args.function == "listUsers":

from userManagment.views import fetchTableUsers

data = {}
data['userID'] = 1

response = fetchTableUsers(data)

print(response.content.decode())



if __name__ == "__main__":
@@ -452,7 +452,6 @@ def submitUserDeletion(request):
json_data = json.dumps(data_ret)
return HttpResponse(json_data)


def createNewACL(request):
try:
userID = request.session['userID']
@@ -465,7 +464,6 @@ def createNewACL(request):
except KeyError:
return redirect(loadLoginPage)


def createACLFunc(request):
try:
val = request.session['userID']
@@ -558,7 +556,6 @@ def createACLFunc(request):
json_data = json.dumps(finalResponse)
return HttpResponse(json_data)


def deleteACL(request):
try:
userID = request.session['userID']
@@ -572,7 +569,6 @@ def deleteACL(request):
except KeyError:
return redirect(loadLoginPage)


def deleteACLFunc(request):
try:
val = request.session['userID']
@@ -599,7 +595,6 @@ def deleteACLFunc(request):
json_data = json.dumps(finalResponse)
return HttpResponse(json_data)


def modifyACL(request):
try:
userID = request.session['userID']
@@ -613,7 +608,6 @@ def modifyACL(request):
except KeyError:
return redirect(loadLoginPage)


def fetchACLDetails(request):
try:
val = request.session['userID']
@@ -705,7 +699,6 @@ def fetchACLDetails(request):
json_data = json.dumps(finalResponse)
return HttpResponse(json_data)


def submitACLModifications(request):
try:
val = request.session['userID']
@@ -811,7 +804,6 @@ def submitACLModifications(request):
json_data = json.dumps(finalResponse)
return HttpResponse(json_data)


def changeUserACL(request):
try:
userID = request.session['userID']
@@ -833,7 +825,6 @@ def changeUserACL(request):
except KeyError:
return redirect(loadLoginPage)


def changeACLFunc(request):
try:
val = request.session['userID']
@@ -874,7 +865,6 @@ def changeACLFunc(request):
json_data = json.dumps(finalResponse)
return HttpResponse(json_data)


def resellerCenter(request):
try:
userID = request.session['userID']
@@ -897,7 +887,6 @@ def resellerCenter(request):
except KeyError:
return redirect(loadLoginPage)


def saveResellerChanges(request):
try:
val = request.session['userID']
@@ -954,7 +943,6 @@ def saveResellerChanges(request):
json_data = json.dumps(finalResponse)
return HttpResponse(json_data)


def listUsers(request):
try:
userID = request.session['userID']
@@ -987,10 +975,12 @@ def listUsers(request):
except KeyError:
return redirect(loadLoginPage)


def fetchTableUsers(request):
try:
userID = request.session['userID']
try:
userID = request.session['userID']
except:
userID = request['userID']

currentACL = ACLManager.loadedACL(userID)

0 comments on commit 6e4c4e1

Please sign in to comment.