mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] Add user privilege check to Jobs List group selector control (#25225)
This commit is contained in:
parent
179c6f2491
commit
4fc00821a4
1 changed files with 3 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
|
||||
import { checkPermission } from 'plugins/ml/privilege/check_privilege';
|
||||
import PropTypes from 'prop-types';
|
||||
import React, {
|
||||
Component,
|
||||
|
@ -66,6 +67,7 @@ export class GroupSelector extends Component {
|
|||
};
|
||||
|
||||
this.refreshJobs = this.props.refreshJobs;
|
||||
this.canUpdateJob = checkPermission('canUpdateJob');
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
|
@ -204,6 +206,7 @@ export class GroupSelector extends Component {
|
|||
iconType="indexEdit"
|
||||
aria-label="Edit job groups"
|
||||
onClick={() => this.togglePopover()}
|
||||
disabled={this.canUpdateJob === false}
|
||||
/>
|
||||
</EuiToolTip>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue