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

[PM-18639] Bugfix - Resend Admin Auth Request After Previous Denial #13574

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rr-bw
Copy link
Contributor

@rr-bw rr-bw commented Feb 26, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-18639

📔 Objective

This PR makes sure we are specifically constructing and returning a new AuthRequestResponse() object from the AuthRequestApiService calls.

Background
In #11545 we created an AuthRequestApiService as part of the refresh work for the LoginViaAuthRequestComponent. In that new AuthRequestApiService I missed wrapping the returned response in a new AuthRequestResponse() constructor.

This object construction is important in the case of this bug because it sets the isAnswered property here.

The bug occurred because this isAnswered property was getting read as undefined here, which led to handleExistingAdminAuthReqDeletedOrDenied() never being run, and thus never clearing the previous Admin Auth Request from state.

📸 Screenshots

tde-admin-approval.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 35.83%. Comparing base (44d50a7) to head (eb495da).

Files with missing lines Patch % Lines
.../services/auth-request/auth-request-api.service.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13574   +/-   ##
=======================================
  Coverage   35.83%   35.83%           
=======================================
  Files        3167     3167           
  Lines       93407    93408    +1     
  Branches    16999    16999           
=======================================
+ Hits        33471    33475    +4     
+ Misses      57345    57342    -3     
  Partials     2591     2591           

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

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details3ff5bfac-fcbc-44c6-9ca7-c9907843e094

Great job, no security vulnerabilities found in this Pull Request

@rr-bw rr-bw marked this pull request as ready for review February 26, 2025 02:27
@rr-bw rr-bw requested a review from a team as a code owner February 26, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant