File tree Expand file tree Collapse file tree
graylog2-web-interface/src/components/inputs/InputsOveriew/expanded-sections Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,8 +18,9 @@ import * as React from 'react';
1818
1919import type { InputSummary } from 'hooks/usePaginatedInputs' ;
2020import { Button } from 'components/bootstrap' ;
21- import { LinkContainer } from 'components/common' ;
21+ import { IfPermitted , LinkContainer } from 'components/common' ;
2222import Routes from 'routing/Routes' ;
23+ import HideOnCloud from 'util/conditional/HideOnCloud' ;
2324
2425type Props = {
2526 input : InputSummary ;
@@ -31,11 +32,15 @@ const extractorsLink = (input: InputSummary) =>
3132 : Routes . local_input_extractors ( input . node , input . id ) ;
3233
3334const ExtractorsSectionActions = ( { input } : Props ) => (
34- < LinkContainer to = { extractorsLink ( input ) } >
35- < Button bsStyle = "link" bsSize = "xsmall" >
36- Manage extractors
37- </ Button >
38- </ LinkContainer >
35+ < HideOnCloud >
36+ < IfPermitted permissions = { [ `inputs:edit:${ input . id } ` , `input_types:create:${ input . type } ` ] } >
37+ < LinkContainer to = { extractorsLink ( input ) } >
38+ < Button bsStyle = "link" bsSize = "xsmall" >
39+ Manage extractors
40+ </ Button >
41+ </ LinkContainer >
42+ </ IfPermitted >
43+ </ HideOnCloud >
3944) ;
4045
4146export default ExtractorsSectionActions ;
You can’t perform that action at this time.
0 commit comments