diff --git a/backend/donations/views/dashboard/dashboard.py b/backend/donations/views/dashboard/dashboard.py index cad56f0d..5819288a 100644 --- a/backend/donations/views/dashboard/dashboard.py +++ b/backend/donations/views/dashboard/dashboard.py @@ -28,4 +28,4 @@ def callback(request, context): if user.is_admin: return admin_callback(request, context) - return ngo_callback(request, context) + return {"redirect": reverse("contul-meu")} diff --git a/backend/redirectioneaza/settings/unfold.py b/backend/redirectioneaza/settings/unfold.py index a6977804..c3e1f6f7 100644 --- a/backend/redirectioneaza/settings/unfold.py +++ b/backend/redirectioneaza/settings/unfold.py @@ -16,6 +16,7 @@ "title": _("Dashboard"), "icon": "dashboard", "link": reverse_lazy("admin:index"), + "permission": lambda request: request.user.is_superuser, }, ], }, diff --git a/backend/templates/v3/admin/base_admin.html b/backend/templates/v3/admin/base_admin.html index 17dce38c..30d0a8c3 100644 --- a/backend/templates/v3/admin/base_admin.html +++ b/backend/templates/v3/admin/base_admin.html @@ -21,9 +21,18 @@