-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-25379] Refactor org metadata #6418
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
Conversation
… side using available data
including new feature flag # Conflicts: # src/Core/Constants.cs
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6418 +/- ##
==========================================
- Coverage 50.42% 50.38% -0.05%
==========================================
Files 1853 1855 +2
Lines 82394 83141 +747
Branches 7265 7533 +268
==========================================
+ Hits 41550 41893 +343
- Misses 39260 39658 +398
- Partials 1584 1590 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed Issues (4)Great job! The following issues were fixed in this Pull Request
|
return TypedResults.NotFound(); | ||
} | ||
|
||
var response = OrganizationMetadataResponse.From(metadata); |
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'm fine with removing this layer of response models when they do nothing but copy the Core models if you want to. Your call.
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.
Great suggestion; thanks! Especially now that it's only 2 properties, this class seems very superfluous now 😆 Removed in ddbf084
removing unneeded response model
# Conflicts: # src/Core/Constants.cs
* ignore serena * removing unused properties from org metadata * removing further properties that can already be fetched on the client side using available data * new vnext endpoint for org metadata plus caching metadata first pass including new feature flag # Conflicts: # src/Core/Constants.cs * [PM-25379] decided against cache and new query shouldn't use the service * pr feedback removing unneeded response model * run dotnet format
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-25379
📔 Objective
This work was a refactor, so no functional or visual changes should be present. Note: these changes are only applied with the feature flag
pm-25379-use-new-organization-metadata-structure
Here’s a list of changes made for this issue.
isEligibleForSelfHost
. This was updated to instead simply check that the org’s plan tier is either families or enterprise and the matching property was removed from the metadata models. (This is equivalent to the logic used by the server API before, but does not require any additional data to be fetched.)isManaged
in org metadata to switch between two variations of UI for the “manage subscription” section. This was updated to instead usehasBillableProvider
which the client already has access to on the org object and the property was removed from the metadata models. The UI switches:isOnSecretsManagerStandalone
is used to force the secrets manager access checkbox when inviting a new member or editing an existing member.occupiedSeatCount
is used in the following cases:This PR is of course the server-side changes. It includes the new feature flag, removing of unused properties, refactoring the
GetMetadata
function into a new query class, and a new vnext endpoint to use that query.⏰ 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