[PM-25379] Refactor org metadata #6441
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-25379
📔 Objective
Note: this is a copy of PR #6418 as that one had to be reverted because it was merged too early. This PR will not be merged until the clients PR is also merged.
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