-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Reduce license plugin api #53489
Reduce license plugin api #53489
Conversation
Pinging @elastic/kibana-platform (Team:Platform) |
@@ -8,31 +8,31 @@ import { ILicense } from '../../../../../../../plugins/licensing/server'; | |||
import { licenseCheck } from '../license'; | |||
|
|||
describe('license check', () => { | |||
let mockLicense: Pick<ILicense, 'isActive' | 'isOneOf'>; | |||
let mockLicense: Pick<ILicense, 'isActive' | 'hasAtLeast'>; |
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.
@justinkambic looks like we should update CODEOWNERS to make uptime owner of the plugin
Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>
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.
Security changes LGTM
Co-Authored-By: Josh Dover <me@joshdover.com>
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* inOneOf --> hasAtLeast. to follow to licensing hierarchical model * adopt licensing tests * add license mock and use it in the tests * adopt security plugin to hasAtLeast and licensing mocks * adopt uptime to hasAtLeast * update readme * add test for unknown license * fix import in js test * fix security plugin merge conflict * Update x-pack/plugins/security/common/licensing/license_service.ts Co-Authored-By: Larry Gregory <lgregorydev@gmail.com> * Update x-pack/plugins/licensing/common/types.ts Co-Authored-By: Josh Dover <me@joshdover.com> * simplify tests * remove unused import
* inOneOf --> hasAtLeast. to follow to licensing hierarchical model * adopt licensing tests * add license mock and use it in the tests * adopt security plugin to hasAtLeast and licensing mocks * adopt uptime to hasAtLeast * update readme * add test for unknown license * fix import in js test * fix security plugin merge conflict * Update x-pack/plugins/security/common/licensing/license_service.ts Co-Authored-By: Larry Gregory <lgregorydev@gmail.com> * Update x-pack/plugins/licensing/common/types.ts Co-Authored-By: Josh Dover <me@joshdover.com> * simplify tests * remove unused import
Summary
Reduces license API surface: isBasic, isNotBasic, isOneOf are superseded by
hasAtLeast
as it reflects the hierarchical nature of the stack licenses.Adds License mocks.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
Dev docs
License method
isOneOf
was superseded byhasAtLeast
that checks the current license is not less than passes minimal required license.