mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-02 19:35:49 +01:00
Bug fix to user permissions!
This commit is contained in:
@@ -85,6 +85,11 @@ def modifyWebsite(request):
|
||||
try:
|
||||
admin = Administrator.objects.get(pk=request.session['userID'])
|
||||
|
||||
if admin.type == 3:
|
||||
final = {'error': 1, "error_message": "Not enough privilege"}
|
||||
final_json = json.dumps(final)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
if admin.type == 1:
|
||||
websites = Websites.objects.all()
|
||||
websitesName = []
|
||||
@@ -126,6 +131,11 @@ def deleteWebsite(request):
|
||||
try:
|
||||
admin = Administrator.objects.get(pk=request.session['userID'])
|
||||
|
||||
if admin.type == 3:
|
||||
final = {'error': 1, "error_message": "Not enough privilege"}
|
||||
final_json = json.dumps(final)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
if admin.type == 1:
|
||||
websites = Websites.objects.all()
|
||||
websitesName = []
|
||||
|
||||
Reference in New Issue
Block a user