diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index 5d435dd..ec8345f 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/home/__pycache__/views.cpython-310.pyc b/gestaoRaul/home/__pycache__/views.cpython-310.pyc index 41433ac..d93498a 100644 Binary files a/gestaoRaul/home/__pycache__/views.cpython-310.pyc and b/gestaoRaul/home/__pycache__/views.cpython-310.pyc differ diff --git a/gestaoRaul/home/views.py b/gestaoRaul/home/views.py index 48756a2..41212cc 100644 --- a/gestaoRaul/home/views.py +++ b/gestaoRaul/home/views.py @@ -1,7 +1,7 @@ from django.shortcuts import render from django.db.models import Sum from django.db.models import Count, F -from django.http import JsonResponse +from django.http import JsonResponse, HttpResponse from comandas.models import ProductComanda @@ -9,6 +9,8 @@ from orders.models import Order from payments.models import Payments def home(request): + if not request.user.is_authenticated or 'Admin' not in str(request.user.groups.all()): + return HttpResponse({'