Skip to content

Remove allowTrial flag in license checking #54293

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 5 commits into from
Mar 30, 2020

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Mar 26, 2020

The allowTrial flag is always true, since trial licenses act as though
everything is licensed. This commit removes the allowTrial flag in
license checking helper methods.

The allowTrial flag is always true, since trial licenses act as though
everything is licensed. This commit removes the allowTrial flag in
license checking helper methods.
@rjernst rjernst added >refactoring :Security/License License functionality for commercial features v8.0.0 v7.8.0 labels Mar 26, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/License)

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

LGTM

@jkakavas
Copy link
Member

Happy to discuss this again and/or drop it if we have consensus yo do so but we intentionally left this be in the previous refactoring work : #51864 (comment)

@rjernst
Copy link
Member Author

rjernst commented Mar 26, 2020

@jkakavas Thanks for the context. I did not know about that previous discussion. However, I still think we should move forward with this. From that discussion:

I was just trying to make a point that it is not unheard of to have the need to treat trial differently

Except it is actually unheard of, which is why allowTrial is always true.

Additionally, the ultimate goal of my refactorings is to remove all of the isXXXAllowed methods in favor of a single method that takes an enum, where the enum values represent licensed features, so that only adding a value to this enum is required for a new feature. If a feature in the future is deemed necessary to not be allowed with a trial license, we can easily add it back to the enum and single isAllowed method.

@rjernst
Copy link
Member Author

rjernst commented Mar 26, 2020

@elasticmachine run elasticsearch-ci/packaging-sample-matrix-unix

@rjernst rjernst merged commit 354f131 into elastic:master Mar 30, 2020
@rjernst rjernst deleted the refactor_license6 branch March 30, 2020 18:42
rjernst added a commit that referenced this pull request Mar 30, 2020
The allowTrial flag is always true, since trial licenses act as though
everything is licensed. This commit removes the allowTrial flag in
license checking helper methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>refactoring :Security/License License functionality for commercial features v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants