Skip to content

Commit cfc379f

Browse files
committed
fix scripted field add button
1 parent 43d890e commit cfc379f

File tree

1 file changed

+2
-2
lines changed
  • src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/header

1 file changed

+2
-2
lines changed

src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ interface HeaderProps extends RouteComponentProps {
2222
}
2323

2424
export const Header = withRouter(({ indexPatternId, history }: HeaderProps) => {
25-
const { application, docLinks } = useKibana<IndexPatternManagmentContext>().services;
25+
const { dataViews, docLinks } = useKibana<IndexPatternManagmentContext>().services;
2626
const links = docLinks?.links;
27-
const userEditPermission = !!application?.capabilities?.indexPatterns?.save;
27+
const userEditPermission = dataViews.getCanSaveSync();
2828
return (
2929
<EuiFlexGroup alignItems="center">
3030
<EuiFlexItem>

0 commit comments

Comments
 (0)