Skip to content

Commit 7ac228b

Browse files
authored
Merge branch 'enext' into docs
2 parents a9e0e9e + 37ab06a commit 7ac228b

File tree

80 files changed

+1992
-6440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1992
-6440
lines changed

app/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ npminstall:
3535
OUT_DIR=$(shell pwd)/eventyay/static npm run build --prefix=eventyay/frontend/schedule-editor
3636

3737
webappbuild:
38-
npm install --prefix=eventyay/webapp
38+
npm ci --prefix=eventyay/webapp
3939
OUT_DIR=$(shell pwd)/eventyay/static npm run build --prefix=eventyay/webapp
4040

File renamed without changes.

src/pretix/api/auth/device.py renamed to app/eventyay/api/auth/device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
from rest_framework import exceptions
44
from rest_framework.authentication import TokenAuthentication
55

6-
from pretix.api.auth.devicesecurity import (
6+
from eventyay.api.auth.devicesecurity import (
77
DEVICE_SECURITY_PROFILES,
88
FullAccessSecurityProfile,
99
)
10-
from pretix.base.models import Device
10+
from eventyay.base.models import Device
1111

1212

1313
class DeviceTokenAuthentication(TokenAuthentication):

src/pretix/api/auth/permission.py renamed to app/eventyay/api/auth/permission.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from rest_framework.permissions import SAFE_METHODS, BasePermission
22

3-
from pretix.api.models import OAuthAccessToken
4-
from pretix.base.models import Device, Event, User
5-
from pretix.base.models.auth import SuperuserPermissionSet
6-
from pretix.base.models.organizer import TeamAPIToken
7-
from pretix.helpers.security import (
3+
from eventyay.api.models import OAuthAccessToken
4+
from eventyay.base.models import Device, Event, User
5+
from eventyay.base.models.auth import SuperuserPermissionSet
6+
from eventyay.base.models.organizer import TeamAPIToken
7+
from eventyay.helpers.security import (
88
SessionInvalid,
99
SessionReauthRequired,
1010
assert_session_valid,
@@ -25,7 +25,7 @@ def has_permission(self, request, view):
2525

2626
if request.user.is_authenticated:
2727
try:
28-
# If this logic is updated, make sure to also update the logic in pretix/control/middleware.py
28+
# If this logic is updated, make sure to also update the logic in eventyay/control/middleware.py
2929
assert_session_valid(request)
3030
except SessionInvalid:
3131
return False
@@ -106,7 +106,7 @@ def has_permission(self, request, view):
106106

107107
if request.user.is_authenticated:
108108
try:
109-
# If this logic is updated, make sure to also update the logic in pretix/control/middleware.py
109+
# If this logic is updated, make sure to also update the logic in eventyay/control/middleware.py
110110
assert_session_valid(request)
111111
except SessionInvalid:
112112
return False
@@ -130,7 +130,7 @@ def has_permission(self, request, view):
130130

131131
if request.user.is_authenticated:
132132
try:
133-
# If this logic is updated, make sure to also update the logic in pretix/control/middleware.py
133+
# If this logic is updated, make sure to also update the logic in eventyay/control/middleware.py
134134
assert_session_valid(request)
135135
except SessionInvalid:
136136
return False

src/pretix/api/auth/token.py renamed to app/eventyay/api/auth/token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from rest_framework import exceptions
33
from rest_framework.authentication import TokenAuthentication
44

5-
from pretix.base.models.organizer import TeamAPIToken
5+
from eventyay.base.models.organizer import TeamAPIToken
66

77

88
class TeamTokenAuthentication(TokenAuthentication):

src/pretix/api/exception.py renamed to app/eventyay/api/exception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from rest_framework.response import Response
22
from rest_framework.views import exception_handler, status
33

4-
from pretix.base.services.locking import LockTimeoutException
4+
from eventyay.base.services.locking import LockTimeoutException
55

66

77
def custom_exception_handler(exc, context):

app/eventyay/api/migrations/0001_initial.py

Lines changed: 15 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 5.1.9 on 2025-09-10 12:36
1+
# Generated by Django 5.2.5 on 2025-10-30 17:53
22

33
import oauth2_provider.generators
44
import oauth2_provider.models
@@ -8,20 +8,19 @@
88

99

1010
class Migration(migrations.Migration):
11+
1112
initial = True
1213

13-
dependencies = []
14+
dependencies = [
15+
]
1416

1517
operations = [
1618
migrations.CreateModel(
1719
name='OAuthAccessToken',
1820
fields=[
1921
('id', models.BigAutoField(primary_key=True, serialize=False)),
2022
('token', models.TextField()),
21-
(
22-
'token_checksum',
23-
oauth2_provider.models.TokenChecksumField(db_index=True, max_length=64, unique=True),
24-
),
23+
('token_checksum', oauth2_provider.models.TokenChecksumField(db_index=True, max_length=64, unique=True)),
2524
('expires', models.DateTimeField()),
2625
('scope', models.TextField(blank=True)),
2726
('created', models.DateTimeField(auto_now_add=True)),
@@ -35,83 +34,19 @@ class Migration(migrations.Migration):
3534
name='OAuthApplication',
3635
fields=[
3736
('id', models.BigAutoField(primary_key=True, serialize=False)),
38-
(
39-
'client_type',
40-
models.CharField(choices=[('confidential', 'Confidential'), ('public', 'Public')], max_length=32),
41-
),
42-
(
43-
'authorization_grant_type',
44-
models.CharField(
45-
choices=[
46-
('authorization-code', 'Authorization code'),
47-
('implicit', 'Implicit'),
48-
('password', 'Resource owner password-based'),
49-
('client-credentials', 'Client credentials'),
50-
('openid-hybrid', 'OpenID connect hybrid'),
51-
],
52-
max_length=32,
53-
),
54-
),
37+
('client_type', models.CharField(choices=[('confidential', 'Confidential'), ('public', 'Public')], max_length=32)),
38+
('authorization_grant_type', models.CharField(choices=[('authorization-code', 'Authorization code'), ('implicit', 'Implicit'), ('password', 'Resource owner password-based'), ('client-credentials', 'Client credentials'), ('openid-hybrid', 'OpenID connect hybrid')], max_length=32)),
5539
('hash_client_secret', models.BooleanField(default=True)),
5640
('skip_authorization', models.BooleanField(default=False)),
5741
('created', models.DateTimeField(auto_now_add=True)),
5842
('updated', models.DateTimeField(auto_now=True)),
59-
(
60-
'algorithm',
61-
models.CharField(
62-
blank=True,
63-
choices=[
64-
('', 'No OIDC support'),
65-
('RS256', 'RSA with SHA-2 256'),
66-
('HS256', 'HMAC with SHA-2 256'),
67-
],
68-
default='',
69-
max_length=5,
70-
),
71-
),
72-
(
73-
'allowed_origins',
74-
models.TextField(
75-
blank=True, default='', help_text='Allowed origins list to enable CORS, space separated'
76-
),
77-
),
43+
('algorithm', models.CharField(blank=True, choices=[('', 'No OIDC support'), ('RS256', 'RSA with SHA-2 256'), ('HS256', 'HMAC with SHA-2 256')], default='', max_length=5)),
44+
('allowed_origins', models.TextField(blank=True, default='', help_text='Allowed origins list to enable CORS, space separated')),
7845
('name', models.CharField(max_length=255, verbose_name='Application name')),
79-
(
80-
'redirect_uris',
81-
models.TextField(
82-
help_text='Allowed URIs list, space separated',
83-
validators=[oauth2_provider.validators.URIValidator],
84-
verbose_name='Redirection URIs',
85-
),
86-
),
87-
(
88-
'post_logout_redirect_uris',
89-
models.TextField(
90-
blank=True,
91-
default='',
92-
help_text='Allowed list with space separated',
93-
validators=[oauth2_provider.validators.URIValidator],
94-
),
95-
),
96-
(
97-
'client_id',
98-
models.CharField(
99-
db_index=True,
100-
default=oauth2_provider.generators.generate_client_id,
101-
max_length=100,
102-
unique=True,
103-
verbose_name='Client ID',
104-
),
105-
),
106-
(
107-
'client_secret',
108-
oauth2_provider.models.ClientSecretField(
109-
db_index=True,
110-
default=oauth2_provider.generators.generate_client_secret,
111-
max_length=255,
112-
verbose_name='Client secret',
113-
),
114-
),
46+
('redirect_uris', models.TextField(help_text='Allowed URIs list, space separated', validators=[oauth2_provider.validators.URIValidator], verbose_name='Redirection URIs')),
47+
('post_logout_redirect_uris', models.TextField(blank=True, default='', help_text='Allowed list with space separated', validators=[oauth2_provider.validators.URIValidator])),
48+
('client_id', models.CharField(db_index=True, default=oauth2_provider.generators.generate_client_id, max_length=100, unique=True, verbose_name='Client ID')),
49+
('client_secret', oauth2_provider.models.ClientSecretField(db_index=True, default=oauth2_provider.generators.generate_client_secret, max_length=255, verbose_name='Client secret')),
11550
('active', models.BooleanField(default=True)),
11651
],
11752
options={
@@ -128,12 +63,7 @@ class Migration(migrations.Migration):
12863
('created', models.DateTimeField(auto_now_add=True)),
12964
('updated', models.DateTimeField(auto_now=True)),
13065
('code_challenge', models.CharField(blank=True, default='', max_length=128)),
131-
(
132-
'code_challenge_method',
133-
models.CharField(
134-
blank=True, choices=[('plain', 'plain'), ('S256', 'S256')], default='', max_length=10
135-
),
136-
),
66+
('code_challenge_method', models.CharField(blank=True, choices=[('plain', 'plain'), ('S256', 'S256')], default='', max_length=10)),
13767
('nonce', models.CharField(blank=True, default='', max_length=255)),
13868
('claims', models.TextField(blank=True)),
13969
('redirect_uri', models.CharField(max_length=2500)),
@@ -176,10 +106,7 @@ class Migration(migrations.Migration):
176106
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
177107
('enabled', models.BooleanField(default=True, verbose_name='Enable webhook')),
178108
('target_url', models.URLField(verbose_name='Target URL')),
179-
(
180-
'all_events',
181-
models.BooleanField(default=True, verbose_name='All events (including newly created ones)'),
182-
),
109+
('all_events', models.BooleanField(default=True, verbose_name='All events (including newly created ones)')),
183110
],
184111
options={
185112
'ordering': ('id',),

0 commit comments

Comments
 (0)