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

Add enterprise edition and licensing #1390

Merged
merged 5 commits into from Aug 14, 2020
Merged

Add enterprise edition and licensing #1390

merged 5 commits into from Aug 14, 2020

Conversation

timgl
Copy link
Collaborator

@timgl timgl commented Aug 10, 2020

Changes

  • Add an "ee" folder that is copyrighted (as opposed to our MIT licensed repository)
  • You can remove this folder and the system will continue functioning normally, in case you want a purely MIT licensed product.
  • Added a section in settings where you can add and manage license keys
  • Created a repo and service to create licenses (Internal link to repo to see how to create a new license key).
  • Add methods to the User model to expose which features are available (given the plan that is activated)

image

Checklist

  • All querysets/queries filter by Team (if this PR affects any querysets/queries)
  • Backend tests (if this PR affects the backend)
  • Cypress E2E tests (if this PR affects the front and/or backend)

@timgl timgl temporarily deployed to posthog-add-enterprise--d1ozsk August 10, 2020 10:26 Inactive
@timgl timgl temporarily deployed to posthog-add-enterprise--d1ozsk August 10, 2020 10:31 Inactive
@@ -0,0 +1,36 @@
The PostHog Enterprise license (the “Enterprise License”)
Copyright (c) 2020 PostHog Inc.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesefhawkins do you mind checking the changes to the licensing

@timgl timgl temporarily deployed to posthog-add-enterprise--d1ozsk August 10, 2020 10:33 Inactive
Copy link
Collaborator

@mariusandra mariusandra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two "typos" that could be fixed... and it might be good to run kea-typegen to get types for the new logic. The rest looks good!

Running it with and without the "ee" folder worked. However when running without that folder, the /setup/licenses page would still open when I entered the URL directly. Then it would crash when I tried to use it.

This can absolutely be left for a future PR, but I think we need a way to also split the frontend into the "ee" and "non-ee" parts, possibly moving the /setup/licenses page into a ee/frontend folder.

LICENSE Outdated Show resolved Hide resolved
frontend/src/scenes/setup/licenseLogic.ts Outdated Show resolved Hide resolved
@timgl timgl temporarily deployed to posthog-add-enterprise--d1ozsk August 10, 2020 13:05 Inactive
@jamesefhawkins jamesefhawkins self-assigned this Aug 10, 2020
@timgl
Copy link
Collaborator Author

timgl commented Aug 10, 2020

@mariusandra Yep agree 100%. I don't quite have the webpack wizardry (and we only have a tiny bit of ee frontend code right now). Added #1395, would love your input

@Twixes
Copy link
Collaborator

Twixes commented Aug 11, 2020

What's the use case for multiple licenses per team?

@timgl
Copy link
Collaborator Author

timgl commented Aug 11, 2020

@Twixes You might add a license that expires, or you might add a license that has a higher plan than the one you currently have. It'll be unlikely you'll have multiple licenses active at once, but at least this gives you the history

@timgl timgl temporarily deployed to posthog-add-enterprise--d1ozsk August 11, 2020 13:13 Inactive
@timgl timgl merged commit 23f5918 into master Aug 14, 2020
@timgl timgl deleted the add-enterprise-edition branch August 14, 2020 09:23
@paolodamico paolodamico mentioned this pull request Aug 15, 2020
3 tasks
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.

None yet

4 participants