-
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
Auth/pm 2996/add auth request data to devices response model #5152
base: main
Are you sure you want to change the base?
Auth/pm 2996/add auth request data to devices response model #5152
Conversation
…up to do and questions to answer.
…-request-data-to-devices-response-model
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5152 +/- ##
=======================================
Coverage 43.35% 43.35%
=======================================
Files 1456 1458 +2
Lines 66468 66566 +98
Branches 6078 6081 +3
=======================================
+ Hits 28817 28861 +44
- Misses 36360 36412 +52
- Partials 1291 1293 +2 ☔ View full report in Codecov by Sentry. |
New Issues
Fixed Issues
|
…est-data-to-devices-response-model
…est-data-to-devices-response-model
d29e69d
to
0562f76
Compare
0562f76
to
647fad8
Compare
test/Infrastructure.EFIntegration.Test/Repositories/DeviceRepositoryTests.cs
Outdated
Show resolved
Hide resolved
bf3949d
to
98434df
Compare
Migrated tests to appropriate place. Fixed up some of the comments discussed with Ike.
98434df
to
97fa55a
Compare
…est-data-to-devices-response-model
Added comment to describe thought process for response model being passed through by the repository.
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.
Overall looks good, have some non-blocking comments.
src/Core/Auth/Models/Api/Response/DeviceAuthRequestResponseModel.cs
Outdated
Show resolved
Hide resolved
util/Migrator/DbScripts/2024-12-04_00_AddActiveDeviceWithPendighAuth.sql
Outdated
Show resolved
Hide resolved
var adminApprovalExpiredAuthRequest = await authRequestRepository.CreateAsync( | ||
CreateAuthRequest(user.Id, AuthRequestType.AdminApproval, CreateExpiredDate(_adminRequestExpiration))); | ||
|
||
// An AdminApproval request that was approved before it expired but the user has been approved for too long, should be deleted. | ||
var adminApprovedExpiredAuthRequest = await authRequestRepository.CreateAsync( | ||
CreateAuthRequest(user.Id, AuthRequestType.AdminApproval, DateTime.UtcNow.AddDays(-6), true, CreateExpiredDate(_afterAdminApprovalExpiration))); | ||
|
||
// An AdminApproval request that was rejected within it's allowed lifetime but has no gone past it's expiration time, should be deleted. | ||
// An AdminApproval request that was rejected within it's allowed lifetime but has not gone past its expiration time, should be deleted. |
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.
⛏️ : *it's
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.
🎉 : nice tests!
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.
💭 : could we move the _globalSetting to the repository since it's already there?
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-2996
📔 Objective
This pr adds two new fields to the get devices response endpoint. Now we respond back with the pending auth requests that match a certain criteria when retrieving devices
📸 Screenshots
old_response.mov
new_response.mov
⏰ 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