mirror of
https://github.com/pretix/pretix.git
synced 2026-10-24 22:59:52 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9f7bf8680 | ||
|
|
2fcb51bf2f | ||
|
|
6a762854e2 | ||
|
|
b29fb69790 | ||
|
|
c7a23da055 | ||
|
|
a3704c54e9 | ||
|
|
764d49482a | ||
|
|
e188796a81 | ||
|
|
1ca41269cd | ||
|
|
9581c08949 | ||
|
|
5393aff5f0 |
No files matched your search
@@ -11,20 +11,8 @@ updates:
|
||||
interval: "daily"
|
||||
versioning-strategy: increase
|
||||
open-pull-requests-limit: 10
|
||||
cooldown:
|
||||
default-days: 7
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/src/pretix/static/npm_dir"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
open-pull-requests-limit: 5
|
||||
cooldown:
|
||||
default-days: 7
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
@@ -26,17 +26,15 @@ jobs:
|
||||
matrix:
|
||||
python-version: ["3.13"]
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt','**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install system dependencies
|
||||
|
||||
@@ -25,17 +25,15 @@ jobs:
|
||||
name: Spellcheck
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.13
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt','**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install system packages
|
||||
|
||||
@@ -16,18 +16,21 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Submission
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 #v7.1.0
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24.x'
|
||||
package-manager-cache: 'false'
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install system dependencies
|
||||
run: sudo apt update && sudo apt install -y gettext unzip
|
||||
- name: Install Python dependencies
|
||||
|
||||
@@ -23,17 +23,15 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Check gettext syntax
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.13
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt','**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install system packages
|
||||
@@ -50,17 +48,15 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Spellcheck
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.13
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt','**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install system packages
|
||||
|
||||
@@ -31,11 +31,9 @@ jobs:
|
||||
name: eslint
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Node.js 24
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 #v7.1.0
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
|
||||
+10
-16
@@ -23,17 +23,15 @@ jobs:
|
||||
name: isort
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.13
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install Dependencies
|
||||
@@ -45,17 +43,15 @@ jobs:
|
||||
name: flake8
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.13
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install Dependencies
|
||||
@@ -67,11 +63,9 @@ jobs:
|
||||
name: licenseheaders
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.13
|
||||
- name: Install Dependencies
|
||||
|
||||
+11
-15
@@ -46,17 +46,15 @@ jobs:
|
||||
ports:
|
||||
- 5432:5432
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install system dependencies
|
||||
@@ -80,9 +78,9 @@ jobs:
|
||||
run: PRETIX_CONFIG_FILE=tests/ci_${{ matrix.database }}.cfg py.test tests/concurrency_tests/ --reuse-db
|
||||
if: matrix.database == 'postgres'
|
||||
- name: Upload coverage
|
||||
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 #v7.1.1
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: src/coverage.xml
|
||||
file: src/coverage.xml
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
if: matrix.database == 'postgres' && matrix.python-version == '3.13'
|
||||
@@ -103,17 +101,15 @@ jobs:
|
||||
ports:
|
||||
- 5432:5432
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt','**/pyproject.toml') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install system dependencies
|
||||
@@ -131,7 +127,7 @@ jobs:
|
||||
- name: Run E2E tests
|
||||
working-directory: ./src
|
||||
run: PRETIX_CONFIG_FILE=tests/ci_postgres.cfg py.test tests/e2e/ -v --maxfail=10 --tracing=retain-on-failure
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 #v7.0.2
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ !cancelled() }}
|
||||
with:
|
||||
name: playwright-traces
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ dependencies = [
|
||||
"django-redis==7.0.*",
|
||||
"django-scopes==2.1.*",
|
||||
"django-statici18n==2.8.*",
|
||||
"djangorestframework==3.17.*",
|
||||
"djangorestframework>=3.18.2",
|
||||
"dnspython==2.8.*",
|
||||
"drf_ujson2==1.7.*",
|
||||
"geoip2==5.*",
|
||||
@@ -77,7 +77,7 @@ dependencies = [
|
||||
"paypal-checkout-serversdk==1.0.*",
|
||||
"PyJWT==2.15.*",
|
||||
"phonenumberslite==9.0.*",
|
||||
"Pillow==12.3.*",
|
||||
"Pillow==13.0.*",
|
||||
"pretix-plugin-build",
|
||||
"protobuf==7.36.*",
|
||||
"psycopg2-binary",
|
||||
|
||||
@@ -76,7 +76,7 @@ class DeviceTokenAuthentication(TokenAuthentication):
|
||||
except DeviceLastSeen.DoesNotExist:
|
||||
# First request from device, create model, ignore result. Use get_or_create to be safe
|
||||
# against concurrent create requests
|
||||
DeviceLastSeen.objects.get_or_create(device=device, last_seen=now())
|
||||
DeviceLastSeen.objects.get_or_create(device=device, defaults={"last_seen": now()})
|
||||
else:
|
||||
if now() - last_seen_obj.last_seen < timedelta(seconds=10):
|
||||
# We don't need to know the last seen info of a device to more precision than this,
|
||||
|
||||
@@ -1198,7 +1198,7 @@ OrganizerFooterLinkFormset = inlineformset_factory(
|
||||
class SSOProviderForm(I18nModelForm):
|
||||
|
||||
config_oidc_base_url = forms.URLField(
|
||||
label=pgettext_lazy('sso_oidc', 'Base URL'),
|
||||
label=pgettext_lazy('sso_oidc', 'Base URL / issuer'),
|
||||
required=False,
|
||||
)
|
||||
config_oidc_client_id = forms.CharField(
|
||||
@@ -1295,6 +1295,14 @@ class SSOProviderForm(I18nModelForm):
|
||||
|
||||
|
||||
class SSOClientForm(I18nModelForm):
|
||||
disp_base_url = forms.CharField(
|
||||
label=_('Base URL / issuer'),
|
||||
disabled=True,
|
||||
)
|
||||
disp_client_id = forms.CharField(
|
||||
label=_('Client ID'),
|
||||
disabled=True,
|
||||
)
|
||||
regenerate_client_secret = forms.BooleanField(
|
||||
label=_('Invalidate old client secret and generate a new one'),
|
||||
required=False,
|
||||
@@ -1302,7 +1310,8 @@ class SSOClientForm(I18nModelForm):
|
||||
|
||||
class Meta:
|
||||
model = CustomerSSOClient
|
||||
fields = ['is_active', 'name', 'client_id', 'client_type', 'authorization_grant_type', 'redirect_uris',
|
||||
fields = ['is_active', 'name', 'disp_base_url', 'disp_client_id', 'regenerate_client_secret',
|
||||
'client_type', 'authorization_grant_type', 'redirect_uris',
|
||||
'allowed_scopes', 'require_pkce']
|
||||
widgets = {
|
||||
'authorization_grant_type': forms.RadioSelect,
|
||||
@@ -1317,13 +1326,15 @@ class SSOClientForm(I18nModelForm):
|
||||
help_text=self.fields['allowed_scopes'].help_text,
|
||||
required=self.fields['allowed_scopes'].required,
|
||||
initial=self.fields['allowed_scopes'].initial,
|
||||
choices=CustomerSSOClient.SCOPE_CHOICES,
|
||||
choices=[(val, format_html('<code>{}</code> – {}', val, label)) for val, label in CustomerSSOClient.SCOPE_CHOICES],
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
organizer = kwargs['event']
|
||||
self.initial['disp_base_url'] = eventreverse_absolute(organizer, 'presale:organizer.index', {}).strip('/')
|
||||
if self.instance and self.instance.pk:
|
||||
self.fields['client_id'].disabled = True
|
||||
self.initial['disp_client_id'] = self.instance.client_id
|
||||
else:
|
||||
del self.fields['client_id']
|
||||
self.initial['disp_client_id'] = _('(will be generated)')
|
||||
del self.fields['regenerate_client_secret']
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,29 @@
|
||||
{% extends "pretixcontrol/organizers/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% block title %}
|
||||
{% if client %}
|
||||
{% trans "SSO client:" %} {{ client.name }}
|
||||
{% else %}
|
||||
{% trans "Create credentials for a new SSO client" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block inner %}
|
||||
{% if client %}
|
||||
<h1>{% trans "SSO client:" %} {{ client.name }}</h1>
|
||||
{% else %}
|
||||
<h1>{% trans "Create a new SSO client" %}</h1>
|
||||
<h1>{% trans "Create credentials for a new SSO client" %}</h1>
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
After submitting this form, client credentials for your SSO client will be generated.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
{% blocktrans trimmed with url="https://docs.pretix.eu/guides/customer-accounts/#using-pretix-as-an-sso-provider" %}
|
||||
For more information, refer to our documentation on <a href="{{ url }}">Using pretix as an SSO provider with external SSO clients</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form class="form-horizontal" action="" method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form layout="control" %}
|
||||
|
||||
@@ -3,16 +3,23 @@
|
||||
{% load bootstrap3 %}
|
||||
{% block title %}{% trans "SSO clients" %}{% endblock %}
|
||||
{% block inner %}
|
||||
<h1>{% trans "SSO clients" %}</h1>
|
||||
<h1>{% trans "SSO clients" %} <small> — {% blocktrans %}
|
||||
"Login with pretix" in external systems
|
||||
{% endblocktrans %}</small></h1>
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
You can allow your customers to log into other systems using their customer account credentials by setting up
|
||||
your other systems as a Single-Sign-On (SSO) client based on OpenID Connect.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<p>
|
||||
{% blocktrans trimmed with url="https://docs.pretix.eu/guides/customer-accounts/#using-pretix-as-an-sso-provider" %}
|
||||
For more information, refer to our documentation on <a href="{{ url }}">Using pretix as an SSO provider with external SSO clients</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<a href="{% url "control:organizer.ssoclient.add" organizer=request.organizer.slug %}" class="btn btn-default">
|
||||
<span class="fa fa-plus"></span>
|
||||
{% trans "Create a new SSO client" %}
|
||||
{% trans "Create credentials for a new SSO client" %}
|
||||
</a>
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
{% extends "pretixcontrol/organizers/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% block title %}
|
||||
{% if provider %}
|
||||
{% trans "External SSO provider:" %} {{ provider.name }}
|
||||
{% else %}
|
||||
{% trans "Connect to an external SSO provider" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block inner %}
|
||||
{% if provider %}
|
||||
<h1>{% trans "SSO provider:" %} {{ provider.name }}</h1>
|
||||
<h1>{% trans "External SSO provider:" %} {{ provider.name }}</h1>
|
||||
{% else %}
|
||||
<h1>{% trans "Create a new SSO provider" %}</h1>
|
||||
<h1>{% trans "Connect to an external SSO provider" %}</h1>
|
||||
{% endif %}
|
||||
<p>
|
||||
{% blocktrans trimmed with url="https://docs.pretix.eu/guides/customer-accounts/#using-pretix-as-an-sso-client" %}
|
||||
For more information, refer to our documentation on <a href="{{ url }}" target="_blank">Using pretix as an SSO client</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form class="form-horizontal" action="" method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form layout="control" %}
|
||||
|
||||
@@ -3,16 +3,23 @@
|
||||
{% load bootstrap3 %}
|
||||
{% block title %}{% trans "SSO providers" %}{% endblock %}
|
||||
{% block inner %}
|
||||
<h1>{% trans "SSO providers" %}</h1>
|
||||
<h1>{% trans "SSO providers" %} <small> — {% blocktrans %}
|
||||
Connect to an external login provider
|
||||
{% endblocktrans %}</small></h1>
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
You can connect existing Single-Sign-On (SSO) providers to allow your customers to log in using your own
|
||||
account system.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<p>
|
||||
{% blocktrans trimmed with url="https://docs.pretix.eu/guides/customer-accounts/#using-pretix-as-an-sso-client" %}
|
||||
For more information, refer to our documentation on <a href="{{ url }}" target="_blank">Using pretix as an SSO client</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<a href="{% url "control:organizer.ssoprovider.add" organizer=request.organizer.slug %}" class="btn btn-default">
|
||||
<span class="fa fa-plus"></span>
|
||||
{% trans "Create a new SSO provider" %}
|
||||
{% trans "Connect to an external SSO provider" %}
|
||||
</a>
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
|
||||
@@ -2817,10 +2817,15 @@ class SSOProviderCreateView(OrganizerDetailViewMixin, OrganizerPermissionRequire
|
||||
return get_object_or_404(CustomerSSOProvider, organizer=self.request.organizer, pk=self.kwargs.get('provider'))
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse('control:organizer.ssoproviders', kwargs={
|
||||
'organizer': self.request.organizer.slug,
|
||||
return reverse('control:organizer.ssoprovider.edit', kwargs={
|
||||
'organizer': self.request.organizer.slug, 'provider': self.object.pk,
|
||||
})
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
ctx['redirect_uri'] = _('(will be generated)')
|
||||
return ctx
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super().get_form_kwargs()
|
||||
kwargs['event'] = self.request.organizer
|
||||
@@ -2950,8 +2955,11 @@ class SSOClientCreateView(OrganizerDetailViewMixin, OrganizerPermissionRequiredM
|
||||
secret = form.instance.set_client_secret()
|
||||
messages.success(
|
||||
self.request,
|
||||
_('The SSO client has been created. Please note down the following client secret, it will never be shown '
|
||||
'again: {secret}').format(secret=secret)
|
||||
_('The SSO client has been created.') + ' ' +
|
||||
_('Please note down the following client secret, it will never be shown again.') + '\n\n' +
|
||||
_('Base URL / issuer') + f': {form.initial["disp_base_url"]}\n\n' +
|
||||
_('Client ID') + f': {form.instance.client_id}\n\n' +
|
||||
_('Client secret') + f': {secret}'
|
||||
)
|
||||
form.instance.organizer = self.request.organizer
|
||||
ret = super().form_valid(form)
|
||||
@@ -3000,8 +3008,9 @@ class SSOClientUpdateView(OrganizerDetailViewMixin, OrganizerPermissionRequiredM
|
||||
secret = form.instance.set_client_secret()
|
||||
messages.success(
|
||||
self.request,
|
||||
_('Your changes have been saved. Please note down the following client secret, it will never be shown '
|
||||
'again: {secret}').format(secret=secret)
|
||||
_('Your changes have been saved.') + ' ' +
|
||||
_('Please note down the following client secret, it will never be shown again.') + '\n\n' +
|
||||
_('Client secret') + f': {secret}'
|
||||
)
|
||||
else:
|
||||
messages.success(
|
||||
|
||||
@@ -8,16 +8,16 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-09-30 07:26+0000\n"
|
||||
"PO-Revision-Date: 2026-09-04 14:29+0000\n"
|
||||
"Last-Translator: Albizuri <oier@puntu.eus>\n"
|
||||
"Language-Team: Basque <https://translate.pretix.eu/projects/pretix/pretix/eu/"
|
||||
">\n"
|
||||
"PO-Revision-Date: 2026-10-23 13:02+0000\n"
|
||||
"Last-Translator: Martin Gross <gross@rami.io>\n"
|
||||
"Language-Team: Basque <https://translate.pretix.eu/projects/pretix/pretix/"
|
||||
"eu/>\n"
|
||||
"Language: eu\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 2026.9\n"
|
||||
"X-Generator: Weblate 2026.10.1\n"
|
||||
|
||||
#: pretix/_base_settings.py
|
||||
msgid "English"
|
||||
@@ -36,8 +36,9 @@ msgid "Arabic"
|
||||
msgstr "Arabiera"
|
||||
|
||||
#: pretix/_base_settings.py
|
||||
#, fuzzy
|
||||
msgid "Basque"
|
||||
msgstr ""
|
||||
msgstr "Euskera"
|
||||
|
||||
#: pretix/_base_settings.py
|
||||
msgid "Catalan"
|
||||
@@ -1171,10 +1172,9 @@ msgid "Check-in datetime on list {}"
|
||||
msgstr "Izen-emate zerrendak"
|
||||
|
||||
#: pretix/base/datasync/sourcefields.py
|
||||
#, fuzzy, python-brace-format
|
||||
#| msgid "Question {val}"
|
||||
#, python-brace-format
|
||||
msgid "Question: {name}"
|
||||
msgstr "Galdera {val}"
|
||||
msgstr "Galdera {name}"
|
||||
|
||||
#: pretix/base/datasync/sourcefields.py pretix/base/settings.py
|
||||
msgid "Given name"
|
||||
@@ -1295,7 +1295,7 @@ msgstr ""
|
||||
#: pretix/control/navigation.py
|
||||
#: pretix/control/templates/pretixcontrol/organizers/customers.html
|
||||
msgid "Customers"
|
||||
msgstr ""
|
||||
msgstr "Bezeroak"
|
||||
|
||||
#: pretix/base/exporters/customers.py pretix/control/forms/filter.py
|
||||
#: pretix/control/templates/pretixcontrol/organizers/customer.html
|
||||
@@ -3096,7 +3096,7 @@ msgstr "Helbide elektronikoa"
|
||||
#: pretix/base/forms/auth.py pretix/control/forms/orders.py
|
||||
#: pretix/control/templates/pretixcontrol/shredder/download.html
|
||||
msgid "Confirmation code"
|
||||
msgstr ""
|
||||
msgstr "Baieztatze kodea"
|
||||
|
||||
#: pretix/base/forms/questions.py
|
||||
#, fuzzy
|
||||
@@ -3162,7 +3162,7 @@ msgstr ""
|
||||
|
||||
#: pretix/base/forms/questions.py
|
||||
msgid "Street"
|
||||
msgstr ""
|
||||
msgstr "Kalea"
|
||||
|
||||
#: pretix/base/forms/questions.py
|
||||
msgid "State"
|
||||
@@ -3430,11 +3430,9 @@ msgid "Exchange System (SdI)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix/base/invoicing/national.py
|
||||
#, fuzzy
|
||||
#| msgid "Gift card code"
|
||||
msgctxt "italian_invoice"
|
||||
msgid "Fiscal code"
|
||||
msgstr "Opari-txartelaren kodea"
|
||||
msgstr "Kode fiskala"
|
||||
|
||||
#: pretix/base/invoicing/national.py
|
||||
msgctxt "italian_invoice"
|
||||
@@ -3761,10 +3759,8 @@ msgid "The relevant plugin is currently not active."
|
||||
msgstr "Produktu hau ez dago eskuragarri."
|
||||
|
||||
#: pretix/base/logentrytypes.py
|
||||
#, fuzzy
|
||||
#| msgid "Order deleted"
|
||||
msgid "(deleted)"
|
||||
msgstr "Ezabatutako eskaera"
|
||||
msgstr "(Ezabatutako eskaera)"
|
||||
|
||||
#: pretix/base/logentrytypes.py
|
||||
#, python-brace-format
|
||||
@@ -6234,13 +6230,13 @@ msgstr "Amaiera"
|
||||
#: pretix/control/templates/pretixcontrol/organizers/outgoing_mail.html
|
||||
#: pretix/control/templates/pretixcontrol/organizers/outgoing_mails.html
|
||||
msgid "queued"
|
||||
msgstr ""
|
||||
msgstr "zerrendan"
|
||||
|
||||
#: pretix/base/models/mail.py
|
||||
#: pretix/control/templates/pretixcontrol/organizers/outgoing_mail.html
|
||||
#: pretix/control/templates/pretixcontrol/organizers/outgoing_mails.html
|
||||
msgid "being sent"
|
||||
msgstr ""
|
||||
msgstr "bidaltzen"
|
||||
|
||||
#: pretix/base/models/mail.py
|
||||
#, fuzzy
|
||||
@@ -6264,7 +6260,7 @@ msgstr ""
|
||||
#: pretix/control/templates/pretixcontrol/organizers/outgoing_mail.html
|
||||
#: pretix/control/templates/pretixcontrol/organizers/outgoing_mails.html
|
||||
msgid "sent"
|
||||
msgstr ""
|
||||
msgstr "bidalita"
|
||||
|
||||
#: pretix/base/models/mail.py
|
||||
#: pretix/control/templates/pretixcontrol/organizers/outgoing_mail.html
|
||||
@@ -6642,7 +6638,7 @@ msgstr "Egiaztatzeak huts egin du"
|
||||
#: pretix/base/models/orders.py pretix/control/views/event.py
|
||||
#: pretix/control/views/organizer.py
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
msgstr "Beste bat"
|
||||
|
||||
#: pretix/base/models/organizer.py
|
||||
msgid ""
|
||||
@@ -6799,7 +6795,7 @@ msgstr "Ordainketa itzuli"
|
||||
#, fuzzy
|
||||
#| msgid "Tax rate"
|
||||
msgid "Tax free"
|
||||
msgstr "Zerga-tasa"
|
||||
msgstr "Zergarik ez"
|
||||
|
||||
#: pretix/base/models/tax.py
|
||||
msgctxt "tax_code"
|
||||
@@ -14807,7 +14803,7 @@ msgstr ""
|
||||
|
||||
#: pretix/control/forms/event.py
|
||||
msgid "European Union"
|
||||
msgstr ""
|
||||
msgstr "Europar Batasuna"
|
||||
|
||||
#: pretix/control/forms/event.py
|
||||
msgid "Any customer"
|
||||
@@ -18749,7 +18745,7 @@ msgstr ""
|
||||
#: pretix/control/templates/pretixcontrol/auth/login.html
|
||||
#: pretix/control/templates/pretixcontrol/auth/register.html
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
msgstr "Berretsi"
|
||||
|
||||
#: pretix/control/templates/pretixcontrol/auth/login.html
|
||||
msgid ""
|
||||
@@ -21609,7 +21605,7 @@ msgstr ""
|
||||
#: pretix/control/templates/pretixcontrol/fragment_quota_box_paid.html
|
||||
#, python-format
|
||||
msgid "Currently available: %(num)s"
|
||||
msgstr ""
|
||||
msgstr "Eskuragarri gaur egun: %(num)s"
|
||||
|
||||
#: pretix/control/templates/pretixcontrol/global_license.html
|
||||
msgid ""
|
||||
|
||||
@@ -8,8 +8,8 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-09-30 07:26+0000\n"
|
||||
"PO-Revision-Date: 2026-07-29 11:04+0000\n"
|
||||
"Last-Translator: Albizuri <oier@puntu.eus>\n"
|
||||
"PO-Revision-Date: 2026-10-23 13:02+0000\n"
|
||||
"Last-Translator: Martin Gross <gross@rami.io>\n"
|
||||
"Language-Team: Basque <https://translate.pretix.eu/projects/pretix/pretix-js/"
|
||||
"eu/>\n"
|
||||
"Language: eu\n"
|
||||
@@ -17,7 +17,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 2026.7.1\n"
|
||||
"X-Generator: Weblate 2026.10.1\n"
|
||||
|
||||
#: pretix/plugins/banktransfer/static/pretixplugins/banktransfer/ui.js
|
||||
msgid "Marked as paid"
|
||||
@@ -870,7 +870,7 @@ msgstr ""
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
msgstr "Erregistratu"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
@@ -917,7 +917,7 @@ msgstr ""
|
||||
#, javascript-format
|
||||
msgctxt "widget"
|
||||
msgid "currently available: %s"
|
||||
msgstr ""
|
||||
msgstr "Eskuragarri gaur egun: %s"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
@@ -1054,32 +1054,32 @@ msgstr ""
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
msgid "Choose a different date"
|
||||
msgstr ""
|
||||
msgstr "Beste data bat aukera"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
msgstr "Atzera"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
msgid "Next month"
|
||||
msgstr ""
|
||||
msgstr "Hurrengo hilabetea"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
msgid "Previous month"
|
||||
msgstr ""
|
||||
msgstr "Aurreko hilabetea"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
msgid "Next week"
|
||||
msgstr ""
|
||||
msgstr "Hurrengo astea"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
msgid "Previous week"
|
||||
msgstr ""
|
||||
msgstr "Aurreko astea"
|
||||
|
||||
#: pretix/static/pretixpresale/widget/src/i18n.ts
|
||||
msgctxt "widget"
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -506,7 +506,8 @@ REST_FRAMEWORK = {
|
||||
'pretix.testutils.api.UploadRenderer',
|
||||
],
|
||||
'EXCEPTION_HANDLER': 'pretix.api.exception.custom_exception_handler',
|
||||
'UNICODE_JSON': False
|
||||
'UNICODE_JSON': False,
|
||||
'LIST_SERIALIZER_ERRORS_AS_DICT': False
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ filterwarnings =
|
||||
ignore:teardown:pytest.PytestWarning
|
||||
ignore:avoid running initialization queries:RuntimeWarning
|
||||
ignore:.*The 'strip_cdata' option of HTMLParser.*:DeprecationWarning:
|
||||
ignore:The list-based error format for `ListSerializer`:rest_framework.deprecation.RemovedInDRF320Warning
|
||||
|
||||
|
||||
[coverage:run]
|
||||
|
||||
@@ -642,6 +642,8 @@ def assert_mail_connection(res, should_connect, use_ssl):
|
||||
True, False
|
||||
])
|
||||
def test_private_smtp_ip(res, use_ssl, settings):
|
||||
settings.EMAIL_HOST_USER = ''
|
||||
settings.EMAIL_HOST_PASSWORD = ''
|
||||
settings.EMAIL_CUSTOM_SMTP_BACKEND = 'pretix.base.email.CheckPrivateNetworkSmtpBackend'
|
||||
settings.MAIL_CUSTOM_SMTP_ALLOW_PRIVATE_NETWORKS = False
|
||||
with assert_mail_connection(res=res, should_connect=False, use_ssl=use_ssl), pytest.raises(match="Request to .* blocked"):
|
||||
@@ -665,6 +667,8 @@ def test_private_smtp_ip(res, use_ssl, settings):
|
||||
True, False
|
||||
])
|
||||
def test_public_smtp_ip(use_ssl, allow_private, settings):
|
||||
settings.EMAIL_HOST_USER = ''
|
||||
settings.EMAIL_HOST_PASSWORD = ''
|
||||
settings.EMAIL_CUSTOM_SMTP_BACKEND = 'pretix.base.email.CheckPrivateNetworkSmtpBackend'
|
||||
settings.MAIL_CUSTOM_SMTP_ALLOW_PRIVATE_NETWORKS = allow_private
|
||||
|
||||
|
||||
Reference in new issue
Block a user