mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Conflicts: # x-pack/plugins/ingest_pipelines/server/plugin.ts # x-pack/plugins/ingest_pipelines/server/routes/api/privileges.ts # x-pack/plugins/ingest_pipelines/server/types.ts # x-pack/plugins/snapshot_restore/server/plugin.ts
This commit is contained in:
parent
a19355a490
commit
67eba4735a
4 changed files with 5 additions and 4 deletions
|
@ -84,7 +84,8 @@ export class SnapshotRestoreServerPlugin implements Plugin<void, void, any, any>
|
|||
router,
|
||||
license: this.license,
|
||||
config: {
|
||||
isSecurityEnabled: security !== undefined && security.__legacyCompat.license.isEnabled(),
|
||||
isSecurityEnabled: () =>
|
||||
security !== undefined && security.__legacyCompat.license.isEnabled(),
|
||||
isCloudEnabled: cloud !== undefined && cloud.isCloudEnabled,
|
||||
isSlmEnabled: pluginConfig.slm_ui.enabled,
|
||||
},
|
||||
|
|
|
@ -39,7 +39,7 @@ export function registerAppRoutes({
|
|||
},
|
||||
};
|
||||
|
||||
if (!isSecurityEnabled) {
|
||||
if (!isSecurityEnabled()) {
|
||||
// If security isn't enabled, let the user use app.
|
||||
return res.ok({ body: privilegesResult });
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ license.getStatus = jest.fn().mockReturnValue({ isValid: true });
|
|||
export const routeDependencies = {
|
||||
license,
|
||||
config: {
|
||||
isSecurityEnabled: true,
|
||||
isSecurityEnabled: jest.fn().mockReturnValue(true),
|
||||
isCloudEnabled: false,
|
||||
isSlmEnabled: true,
|
||||
},
|
||||
|
|
|
@ -21,7 +21,7 @@ export interface RouteDependencies {
|
|||
license: License;
|
||||
config: {
|
||||
isSlmEnabled: boolean;
|
||||
isSecurityEnabled: boolean;
|
||||
isSecurityEnabled: () => boolean;
|
||||
isCloudEnabled: boolean;
|
||||
};
|
||||
lib: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue