User session tracking #93587
@ -27,7 +27,6 @@ class Migration(migrations.Migration):
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
('agent_is_trusted', models.BooleanField(default=False)),
|
||||
('ip', models.GenericIPAddressField(blank=True, null=True)),
|
||||
(
|
||||
'session',
|
||||
|
@ -654,7 +654,6 @@ class UserNote(models.Model):
|
||||
|
||||
class UserSession(models.Model):
|
||||
id = models.BigAutoField(primary_key=True)
|
||||
agent_is_trusted = models.BooleanField(default=False, null=False)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
last_active_at = models.DateTimeField()
|
||||
ip = models.GenericIPAddressField(null=True, blank=True)
|
||||
@ -674,7 +673,6 @@ class UserSession(models.Model):
|
||||
return cls.objects.update_or_create(
|
||||
session_id=request.session.session_key,
|
||||
defaults={
|
||||
'agent_is_trusted': hasattr(request, 'agent') and request.agent.is_trusted,
|
||||
'ip': bid_main.utils.get_client_ip(request),
|
||||
'user': user,
|
||||
'last_active_at': timezone.now(),
|
||||
|
@ -65,7 +65,6 @@ INSTALLED_APPS = [
|
||||
"bid_api",
|
||||
"bid_addon_support",
|
||||
"background_task",
|
||||
"django_agent_trust",
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@ -74,7 +73,6 @@ MIDDLEWARE = [
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
"django_agent_trust.middleware.AgentMiddleware",
|
||||
"bid_main.middleware.user_session_middleware",
|
||||
"django.contrib.messages.middleware.MessageMiddleware",
|
||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
|
@ -10,7 +10,6 @@ csscompressor==0.9.5 ; python_version >= "3.8" and python_version < "4"
|
||||
deprecated==1.2.14 ; python_version >= "3.8" and python_version < "4"
|
||||
dj-database-url==2.2.0
|
||||
django-admin-select2==1.0.1 ; python_version >= "3.8" and python_version < "4"
|
||||
django-agent-trust==1.1.0
|
||||
django-background-tasks-updated @ git+https://projects.blender.org/infrastructure/django-background-tasks.git@1.2.10
|
||||
django-compat==1.0.15 ; python_version >= "3.8" and python_version < "4"
|
||||
django-loginas==0.3.11 ; python_version >= "3.8" and python_version < "4"
|
||||
|
Loading…
Reference in New Issue
Block a user