3 Commits

Author SHA1 Message Date
dependabot[bot] 235bcb9916 [UPDATE] Update sentry-sdk requirement
Updates the requirements on [sentry-sdk](https://github.com/getsentry/sentry-python) to permit the latest version.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.63.0...2.64.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-version: 2.64.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-06 08:23:05 +00:00
thomas girod 847511d27f Merge pull request #1441 from ae-utbm/fix-barman-login
fix: session not properly updated on counter login
2026-06-29 10:26:29 +02:00
imperosol a75d5e06b6 fix: session not properly updated on counter login
Fixes #1440
2026-06-24 22:22:34 +02:00
3 changed files with 24 additions and 1 deletions
+22
View File
@@ -886,6 +886,28 @@ class TestBarmanConnection(TestCase):
)
assert response.status_code == 403
def test_logout_then_login(self):
"""Test that the login is successful if it is after a previous logout.
This is a regression test for #1440
"""
self.client.post( # login
self.login_url, {"username": self.barman.username, "password": "plop"}
)
self.client.post( # logout
reverse("counter:logout", kwargs={"counter_id": self.counter.id}),
data={"user_id": self.barman.id},
)
response = self.client.post( # and re-login
self.login_url, {"username": self.barman.username, "password": "plop"}
)
assert response.status_code == 200
assert response.headers["HX-Redirect"] == self.detail_url
response = self.client.get(
self.detail_url, {"username": self.barman.username, "password": "plop"}
)
assert self.barman in response.wsgi_request.barmen
@pytest.mark.django_db
def test_barman_timeout(client: Client):
+1
View File
@@ -61,6 +61,7 @@ class CounterLoginFragment(FragmentMixin, SingleObjectMixin, FormView):
user = form.get_user()
perm = self.object.permanencies.create(user=user, start=timezone.now())
self.request.session.setdefault(SESSION_PERMANENCES_KEY, []).append(perm.id)
self.request.session.modified = True
self.success_url = reverse(
"counter:details", kwargs={"counter_id": self.object.id}
)
+1 -1
View File
@@ -35,7 +35,7 @@ dependencies = [
"django-ordered-model>=3.7.4,<4.0.0",
"django-simple-captcha>=0.6.3,<1.0.0",
"python-dateutil>=2.9.0.post0,<3.0.0.0",
"sentry-sdk>=2.63.0,<3.0.0",
"sentry-sdk>=2.64.0,<3.0.0",
"jinja2>=3.1.6,<4.0.0",
"django-countries>=9.0.0,<10.0.0",
"dict2xml>=1.7.8,<2.0.0",