Skip to content

Commit 9a787d5

Browse files
authored
add max age to cookie (#1179)
1 parent fd87f23 commit 9a787d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

codecov_auth/admin.py

+3
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ def impersonate_owner(self, request, queryset):
9292

9393
# this cookie is read by the `ImpersonationMiddleware` and
9494
# will reset `request.current_owner` to the impersonated owner
95+
max_age = 900 # 15 minutes
9596
response.set_cookie(
9697
"staff_user",
9798
owner.ownerid,
9899
domain=settings.COOKIES_DOMAIN,
99100
samesite=settings.COOKIE_SAME_SITE,
101+
max_age=max_age,
100102
)
101103
History.log(
102104
Owner.objects.get(ownerid=owner.ownerid),
@@ -583,6 +585,7 @@ class OwnerAdmin(AdminMixin, admin.ModelAdmin):
583585
"student_created_at",
584586
"student_updated_at",
585587
"user",
588+
"trial_fired_by",
586589
)
587590

588591
fields = readonly_fields + (

0 commit comments

Comments
 (0)