Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add additional log messages to directauth() #7716

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

microamp
Copy link
Collaborator

Resolves #7709

@microamp microamp marked this pull request as ready for review July 20, 2024 20:27
Copy link

codecov bot commented Jul 20, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.79%. Comparing base (b00dfd3) to head (a4bb31c).
Report is 11 commits behind head on main.

Files Patch % Lines
ietf/api/views.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7716   +/-   ##
=======================================
  Coverage   88.79%   88.79%           
=======================================
  Files         296      296           
  Lines       41319    41328    +9     
=======================================
+ Hits        36688    36698   +10     
+ Misses       4631     4630    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 458 to 462
if user_query.filter(person__isnull=True).count() == 1: # Can't inspect user.person direclty here
log.log(f"Direct auth of personless user {user.pk}:{user.username}")
else:
log.log(f"Direct auth: {user.pk}:{user.person.plain_name()}")
log.log(f"Direct auth success: {username}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is overly chatty - can we tighten it up so that we don't get two log lines as we go through this code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I added the Direct auth success prefix to each successful response above.

@rjsparks rjsparks merged commit aa36f48 into ietf-tools:main Jul 21, 2024
9 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logging to directauth()
3 participants