Skip to content

Commit

Permalink
Merge branch 'main' into web/fix-modal-stack-depletion
Browse files Browse the repository at this point in the history
* main:
  website/developer-docs: add a baby Style Guide (#9900)
  website/integrations: gitlab: update certificate key pair location and specify sha (#9925)
  root: handle asgi exception (#10085)
  website: bump prettier from 3.3.1 to 3.3.2 in /website (#10082)
  web: bump prettier from 3.3.1 to 3.3.2 in /web (#10081)
  core: bump google-api-python-client from 2.132.0 to 2.133.0 (#10083)
  web: bump prettier from 3.3.1 to 3.3.2 in /tests/wdio (#10079)
  web: bump chromedriver from 125.0.3 to 126.0.0 in /tests/wdio (#10078)
  web: bump @sentry/browser from 8.8.0 to 8.9.1 in /web in the sentry group (#10080)
  web: bump braces from 3.0.2 to 3.0.3 in /web (#10077)
  website: bump braces from 3.0.2 to 3.0.3 in /website (#10076)
  web: bump braces from 3.0.2 to 3.0.3 in /tests/wdio (#10075)
  core: bump azure-identity from 1.16.0 to 1.16.1 (#10071)
  • Loading branch information
kensternberg-authentik committed Jun 13, 2024
2 parents e261053 + 8f82dac commit 9cfef2a
Show file tree
Hide file tree
Showing 20 changed files with 236 additions and 156 deletions.
8 changes: 4 additions & 4 deletions authentik/core/api/used_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def get_delete_action(manager: Manager) -> str:
"""Get the delete action from the Foreign key, falls back to cascade"""
if hasattr(manager, "field"):
if manager.field.remote_field.on_delete.__name__ == SET_NULL.__name__:
return DeleteAction.SET_NULL.name
return DeleteAction.SET_NULL.value
if manager.field.remote_field.on_delete.__name__ == SET_DEFAULT.__name__:
return DeleteAction.SET_DEFAULT.name
return DeleteAction.SET_DEFAULT.value
if hasattr(manager, "source_field"):
return DeleteAction.CASCADE_MANY.name
return DeleteAction.CASCADE.name
return DeleteAction.CASCADE_MANY.value
return DeleteAction.CASCADE.value


class UsedByMixin:
Expand Down
2 changes: 1 addition & 1 deletion authentik/crypto/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def test_used_by(self):
"model_name": "oauth2provider",
"pk": str(provider.pk),
"name": str(provider),
"action": DeleteAction.SET_NULL.name,
"action": DeleteAction.SET_NULL.value,
}
],
)
Expand Down
7 changes: 6 additions & 1 deletion authentik/root/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from time import perf_counter, time
from typing import Any

from channels.exceptions import DenyConnection
from django.conf import settings
from django.contrib.sessions.backends.base import UpdateError
from django.contrib.sessions.exceptions import SessionInterrupted
Expand Down Expand Up @@ -271,7 +272,11 @@ def __init__(self, inner):

async def __call__(self, scope, receive, send):
self.log(scope)
return await self.inner(scope, receive, send)
try:
return await self.inner(scope, receive, send)
except Exception as exc:
LOGGER.warning("Exception in ASGI application", exc=exc)
raise DenyConnection() from None

def log(self, scope: dict, **kwargs):
"""Log request"""
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions tests/wdio/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/wdio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"eslint-config-google": "^0.14.0",
"eslint-plugin-sonarjs": "^0.25.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.1",
"prettier": "^3.3.2",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"wdio-wait-for": "^3.0.11"
Expand All @@ -32,6 +32,6 @@
"node": ">=20"
},
"dependencies": {
"chromedriver": "^125.0.3"
"chromedriver": "^126.0.0"
}
}
Loading

0 comments on commit 9cfef2a

Please sign in to comment.