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
Fix multiorg license report #2315
Conversation
Your preview environment pr-2315-bttf has been deployed. Preview environment endpoints are available at: |
packages/back-end/src/routers/organizations/organizations.controller.ts
Outdated
Show resolved
Hide resolved
packages/front-end/components/License/DownloadLicenseUsageButton.tsx
Outdated
Show resolved
Hide resolved
@@ -35,7 +36,7 @@ const ShowLicenseInfo: FC<{ | |||
|
|||
// TODO: Remove this once we have migrated all organizations to use the license key | |||
const usesLicenseInfoOnModel = | |||
!showUpgradeButton && !organization?.licenseKey; | |||
isCloud() && !showUpgradeButton && !organization?.licenseKey; |
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.
Not sure if I understand why we need the isCloud()
check. Do self-hosted Growthbook orgs not use the license info from the licenses
collection?
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.
Because self hosted orgs can also specify the license in an environmental variable rather than on the mongo organization object. We want to show the license info for them too. Only on cloud and only on old organizations still keeping the license data itself as properties on the organization, do we want to hide the license info, because it would not display correctly. We will be migrating those organizations off in the coming week.
Co-authored-by: Michael Samper <msamper@growthbook.io>
Features and Changes
Testing
set
IS_MULTI_ORG=true
in both front-end/.env.local and back-end/.env.localset up growthbook with at least two orgs.
add some duplicate users in both orgs, and some unique.
add some duplicate invites in both orgs, and some unique.
Make sure the current user logged in has
superAdmin: true
Go to /admin
Click "Download License Report" button.
Open the json and see something like this - making sure the seatsUsed and activeSeatsUsed matches the number of users and invites.
Screenshots