Skip to content

Commit

Permalink
[PR feedback] Type name
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Mar 2, 2021
1 parent f38d6ad commit f6bd9be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/enterprise_search/common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface InitialAppData {
ilmEnabled?: boolean;
isFederatedAuth?: boolean;
configuredLimits?: ConfiguredLimits;
access?: Access;
access?: ProductAccess;
appSearch?: AppSearchAccount;
workplaceSearch?: WorkplaceSearchInitialData;
}
Expand All @@ -29,7 +29,7 @@ export interface ConfiguredLimits {
workplaceSearch: WorkplaceSearchConfiguredLimits;
}

export interface Access {
export interface ProductAccess {
hasAppSearchAccess: boolean;
hasWorkplaceSearchAccess: boolean;
}
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/enterprise_search/server/lib/check_access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { KibanaRequest, Logger } from 'src/core/server';

import { SecurityPluginSetup } from '../../../security/server';
import { SpacesPluginStart } from '../../../spaces/server';
import { Access } from '../../common/types';
import { ProductAccess } from '../../common/types';
import { ConfigType } from '../index';

import { callEnterpriseSearchConfigAPI } from './enterprise_search_config_api';
Expand Down Expand Up @@ -42,7 +42,7 @@ export const checkAccess = async ({
spaces,
request,
log,
}: CheckAccess): Promise<Access> => {
}: CheckAccess): Promise<ProductAccess> => {
const isRbacEnabled = security?.authz.mode.useRbacForRequest(request) ?? false;

// We can only retrieve the active space when either:
Expand Down

0 comments on commit f6bd9be

Please sign in to comment.