-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-5718] Fix free organization generating TOTP #11918
[PM-5718] Fix free organization generating TOTP #11918
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11918 +/- ##
=======================================
Coverage 34.13% 34.14%
=======================================
Files 2936 2936
Lines 90428 90446 +18
Branches 16988 16992 +4
=======================================
+ Hits 30869 30880 +11
- Misses 57102 57109 +7
Partials 2457 2457 ☔ View full report in Codecov by Sentry. |
New Issues
Fixed Issues
|
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.
I am not seeing TOTP codes within a free organization on the web vault or desktop for a premium user.
Screen.Recording.2025-01-10.at.2.51.29.PM.mov
// User premium status only applies to personal ciphers, organizationUseTotp applies to organization ciphers | ||
return (userHasPremium && cipher.organizationId == null) || cipher.organizationUseTotp; |
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.
👍 Helpful comment
🎟️ Tracking
PM-5718
📔 Objective
The
add-edit
component in the individual vault would not have an organization set and would fall back to the user's premium status instead of the organization that owned the cipher, which would allow free org ciphers to generate totps codes.Fixed by updating the
showTotp
condition to check only consider the user premium status if it is not owned by an organization; otherwise, rely on the value oforganizationUseTotp
flag on the cipher view.Applies the same logic to the refreshed
CipherView
component as well.⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes