mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Allow sales channels to opt out of customer accounts
This commit is contained in:
@@ -82,6 +82,13 @@ class SalesChannel:
|
||||
"""
|
||||
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():
|
||||
global _ALL_CHANNELS
|
||||
|
||||
@@ -236,7 +236,7 @@ class CustomerStep(CartMixin, TemplateFlowStep):
|
||||
icon = 'user'
|
||||
|
||||
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
|
||||
def login_form(self):
|
||||
|
||||
Reference in New Issue
Block a user