Add JWT auth with per-user data isolation and account settings.

Users can register, log in, and manage profile/password in a personal account page; server data is scoped by owner across contacts, maps, tags, and import.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-28 21:10:16 +03:00
co-authored by Cursor
parent 85b8b2e9b8
commit 4eb4c145b6
40 changed files with 2301 additions and 117 deletions
+16
View File
@@ -0,0 +1,16 @@
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework_simplejwt.authentication import JWTAuthentication
from core.access import use_jwt_auth
class JwtAuthMixin:
def get_permissions(self):
if use_jwt_auth():
return [IsAuthenticated()]
return [AllowAny()]
def get_authenticators(self):
if use_jwt_auth():
return [JWTAuthentication()]
return super().get_authenticators()