diff --git a/core/auth/mixins.py b/core/auth/mixins.py index 54bdc481..dfba3f11 100644 --- a/core/auth/mixins.py +++ b/core/auth/mixins.py @@ -227,6 +227,19 @@ class FormerSubscriberMixin(AccessMixin): return super().dispatch(request, *args, **kwargs) +class IsSubscriberMixin(AccessMixin): + """Check if the user is a subscriber. + + Raises: + PermissionDenied: if the user isn't subscribed. + """ + + def dispatch(self, request, *args, **kwargs): + if not request.user.is_subscribed: + raise PermissionDenied + return super().dispatch(request, *args, **kwargs) + + class PermissionOrAuthorRequiredMixin(PermissionRequiredMixin): """Require that the user has the required perm or is the object author. diff --git a/eboutic/templates/eboutic/eboutic_main.jinja b/eboutic/templates/eboutic/eboutic_main.jinja index 1e070b95..71757436 100644 --- a/eboutic/templates/eboutic/eboutic_main.jinja +++ b/eboutic/templates/eboutic/eboutic_main.jinja @@ -95,23 +95,36 @@
+ {% trans trimmed %} + Our partner uses Weezevent to sell tickets. + Weezevent may collect user info according to + it's own privacy policy. + By clicking the accept button you consent to + their terms of services. + {% endtrans %} +
+ + {% trans %}Privacy policy{% endtrans %} + + +
{%- trans trimmed %}
diff --git a/eboutic/templates/eboutic/eurok_fragment.jinja b/eboutic/templates/eboutic/eurok_fragment.jinja
new file mode 100644
index 00000000..c2791d8b
--- /dev/null
+++ b/eboutic/templates/eboutic/eurok_fragment.jinja
@@ -0,0 +1,17 @@
+
+ Billetterie Weezevent
+
+
diff --git a/eboutic/urls.py b/eboutic/urls.py
index a8029b1c..2286b6fd 100644
--- a/eboutic/urls.py
+++ b/eboutic/urls.py
@@ -29,6 +29,7 @@ from eboutic.views import (
BillingInfoFormFragment,
EbouticCommand,
EtransactionAutoAnswer,
+ EurokPartnerFragment,
eboutic_main,
pay_with_sith,
payment_result,
@@ -43,6 +44,7 @@ urlpatterns = [
path("billing-infos/", BillingInfoFormFragment.as_view(), name="billing_infos"),
path("pay/sith/", pay_with_sith, name="pay_with_sith"),
path("pay/