allow is_logged_in_counter to target a specific counter

This commit is contained in:
imperosol committed 2026-10-30 14:38:00 +01:00
1 parent 83e8001eac
commit 7bc980113a
6 files changed
+53 -59

No files matched your search

+3 -7
View File
@@ -242,15 +242,11 @@ class RefillingCreateView(FragmentMixin, CreateView):
if not self.customer.can_buy:
raise Http404
if not is_logged_in_counter(request):
raise PermissionDenied
self.counter: Counter = get_object_or_404(Counter, id=self.kwargs["counter_id"])
if not (
request.barmen
and request.barmen.issubset(self.counter.barmen_list)
and self.counter.can_refill
if (
not is_logged_in_counter(request, counter=self.counter)
or not self.counter.can_refill
):
raise PermissionDenied