mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Allow sales channels to opt out of customer accounts
This commit is contained in:
@@ -82,6 +82,13 @@ class SalesChannel:
|
|||||||
"""
|
"""
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@property
|
||||||
|
def customer_accounts_supported(self) -> bool:
|
||||||
|
"""
|
||||||
|
If this property is ``True``, checkout will show the customer login step.
|
||||||
|
"""
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def get_all_sales_channels():
|
def get_all_sales_channels():
|
||||||
global _ALL_CHANNELS
|
global _ALL_CHANNELS
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ class CustomerStep(CartMixin, TemplateFlowStep):
|
|||||||
icon = 'user'
|
icon = 'user'
|
||||||
|
|
||||||
def is_applicable(self, request):
|
def is_applicable(self, request):
|
||||||
return request.organizer.settings.customer_accounts
|
return request.organizer.settings.customer_accounts and request.sales_channel.customer_accounts_supported
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def login_form(self):
|
def login_form(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user