-
Notifications
You must be signed in to change notification settings - Fork 905
feat: implement premium vs enterprise licenses #13907
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4527037
chore: implement feature sets to licenses
Emyrk 743c442
feat: implement premium vs enterprise licenses
Emyrk 44078dc
add unit tests with variants
Emyrk 3d234e9
add more unit tests
Emyrk 649d30f
make fmt
Emyrk 1ebb3a5
linting
Emyrk 021fb9b
remove variants
Emyrk 6fc3959
Update unit tests
Emyrk 1bc8288
move readme to doc.go
Emyrk 96f0b2d
premium license has multi-org enabled
Emyrk 41c2726
make enterprise = All - [multi-org]
Emyrk e9f1aa9
make entitlement weight a method on the enum
Emyrk 1c4a305
premium = All
Emyrk 20aa6b4
move CompareFeatures to a method on the struct
Emyrk ef707cf
linting
Emyrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
A while ago Ammar did work to make it so we don't have to list new features in a bunch of places.
Instead of this, could we do the inverse where Premium simply detracts from the list instead? Seems easier to mentally model.
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.
If I understand correctly, you are saying we have 1 list,
All()
(it's FeatureNames() or something atm).And we define
enterprise = All() - [multi-org]
,premium = All()
. Rather than this explicit listing?If we define it that way, it feels more likely to accidentally include a feature in "enterprise", and then we'd have to revoke it later. This current method might be a bit of a nuisance to deal with, but it errors on the side of restrictive.
Now our unit tests do not use feature sets, they manually define features. So this might reveal something lacking in our unit tests that only running a real server will pickup 🤔.
I'm still a bit split on the ideal way.
Uh oh!
There was an error while loading. Please reload this page.
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 switch it 👍. We should probably add some tests to assert we don't leak features into the wrong set, but not in this PR.
7436159 + 8e11ff9