mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 08:16:11 +01:00
Language updates and Bug fixes to user managment.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user