mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-31 06:39:31 +00:00
allow is_logged_in_counter to target a specific counter
This commit is contained in:
1 parent
83e8001eac
commit
7bc980113a
6 files changed
+53
-59
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user