Language updates and Bug fixes to user managment.

This commit is contained in:
usmannasir
2017-10-30 14:34:07 +05:00
parent 6cc8ba2d06
commit 897a8504c2
17 changed files with 394 additions and 230 deletions

View File

@@ -26,8 +26,12 @@ def createPacakge(request):
try:
val = request.session['userID']
admin = Administrator.objects.get(pk=val)
if admin.type == 3:
return HttpResponse("You don't have enough privileges to access this page.")
except KeyError:
return redirect(loadLoginPage)
@@ -42,6 +46,9 @@ def deletePacakge(request):
admin = Administrator.objects.get(pk=val)
if admin.type == 3:
return HttpResponse("You don't have enough privileges to access this page.")
if admin.type == 1:
packages = Package.objects.all()
else:
@@ -130,6 +137,9 @@ def modifyPackage(request):
try:
admin = Administrator.objects.get(pk=val)
if admin.type == 3:
return HttpResponse("You don't have enough privileges to access this page.")
if admin.type == 1:
packages = Package.objects.all()
else: