-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: Update owner query with isOktaAuthenticated
field
#670
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #670 +/- ##
=======================================
Coverage 91.70% 91.70%
=======================================
Files 633 632 -1
Lines 17010 17014 +4
=======================================
+ Hits 15599 15603 +4
Misses 1411 1411
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #670 +/- ##
=======================================
Coverage 91.70% 91.70%
=======================================
Files 633 632 -1
Lines 17010 17014 +4
=======================================
+ Hits 15599 15603 +4
Misses 1411 1411
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #670 +/- ##
===========================================
Coverage 96.01000 96.01000
===========================================
Files 813 814 +1
Lines 18347 18365 +18
===========================================
+ Hits 17615 17633 +18
Misses 732 732
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
graphql_api/types/owner/owner.py
Outdated
@require_part_of_org | ||
def resolve_is_user_okta_authenticated(owner: Owner, info) -> bool: | ||
okta_signed_in_accounts = info.context["request"].session.get( | ||
"okta_signed_in_accounts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The session key value is incorrect. I think it's actually okta_logged_in_accounts
(the variable is OKTA_SIGNED_IN_ACCOUNTS
, which is bad on my part).
I would suggest to import the variable rather than hard-coding the session key here to avoid the mismatch in different parts of the code:
OKTA_SIGNED_IN_ACCOUNTS_SESSION_KEY = "okta_logged_in_accounts" |
(also, feel free to update the variable name or the value stored in the session, as it's inconsistent and I missed it).
Purpose/Motivation
What is the feature? Why is this being done?
We need this as a flag to tell if current user is OKTA authenticated to display okta banners
Links to relevant tickets
codecov/engineering-team#2053
What does this PR do?
Include a brief description of the changes in this PR. Bullet points are your friend.
Notes to Reviewer
Anything to note to the team? Any tips on how to review, or where to start?
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.