diff --git a/x-pack/plugins/code/public/components/admin_page/empty_project.tsx b/x-pack/plugins/code/public/components/admin_page/empty_project.tsx
index 0f75513ed02f4..d64e44b3013da 100644
--- a/x-pack/plugins/code/public/components/admin_page/empty_project.tsx
+++ b/x-pack/plugins/code/public/components/admin_page/empty_project.tsx
@@ -8,12 +8,12 @@ import React from 'react';
import { Link } from 'react-router-dom';
import { EuiButton, EuiFlexGroup, EuiSpacer, EuiText } from '@elastic/eui';
-import { uiCapabilities } from 'ui/capabilities';
+import { capabilities } from 'ui/capabilities';
import { ImportProject } from './import_project';
export const EmptyProject = () => {
- const isAdmin = uiCapabilities.code.admin as boolean;
+ const isAdmin = capabilities.get().code.admin as boolean;
return (
diff --git a/x-pack/plugins/code/public/components/admin_page/project_tab.tsx b/x-pack/plugins/code/public/components/admin_page/project_tab.tsx
index 6031e2df4630d..e108e73449ed6 100644
--- a/x-pack/plugins/code/public/components/admin_page/project_tab.tsx
+++ b/x-pack/plugins/code/public/components/admin_page/project_tab.tsx
@@ -28,7 +28,7 @@ import {
import moment from 'moment';
import React, { ChangeEvent } from 'react';
import { connect } from 'react-redux';
-import { uiCapabilities } from 'ui/capabilities';
+import { capabilities } from 'ui/capabilities';
import { Repository } from '../../../model';
import { closeToast, importRepo } from '../../actions';
import { RepoStatus, RootState } from '../../reducers';
@@ -200,7 +200,7 @@ class CodeProjectTab extends React.PureComponent
{
project={repo}
showStatus={true}
status={status[repo.uri]}
- enableManagement={uiCapabilities.code.admin as boolean}
+ enableManagement={capabilities.get().code.admin as boolean}
/>
));
@@ -238,7 +238,7 @@ class CodeProjectTab extends React.PureComponent {
- {(uiCapabilities.code.admin as boolean) && (
+ {(capabilities.get().code.admin as boolean) && (
// @ts-ignore