change for ocr confidence

This commit is contained in:
2025-10-30 12:01:49 +01:00
parent b5f31a8c72
commit 2260c7cc27
16 changed files with 237 additions and 295 deletions
+4 -4
View File
@@ -27,10 +27,10 @@ class SimpleCASBackend(BaseBackend):
print(f"CAS Attributes: {attributes}")
User = get_user_model()
# Try to find user by CAS user ID first, then by username
username = attributes.get("username", cas_user_id).lower()
try:
# First try to find by CAS user ID
user = User.objects.get(cas_user_id=cas_user_id)
@@ -50,10 +50,10 @@ class SimpleCASBackend(BaseBackend):
last_name=attributes.get("lastname", ""),
email=attributes.get("email", ""),
)
# Always update CAS data on login
user.update_cas_data(cas_user_id, attributes)
return user
def validate_ticket(self, ticket, service):