Skip to content

Commit

Permalink
[ML] Add user privilege check to Jobs List group selector control (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson authored Nov 7, 2018
1 parent d68e9a7 commit 0863fb3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/


import { checkPermission } from 'plugins/ml/privilege/check_privilege';
import PropTypes from 'prop-types';
import React, {
Component,
Expand Down Expand Up @@ -66,6 +67,7 @@ export class GroupSelector extends Component {
};

this.refreshJobs = this.props.refreshJobs;
this.canUpdateJob = checkPermission('canUpdateJob');
}

static getDerivedStateFromProps(props, state) {
Expand Down Expand Up @@ -204,6 +206,7 @@ export class GroupSelector extends Component {
iconType="indexEdit"
aria-label="Edit job groups"
onClick={() => this.togglePopover()}
disabled={this.canUpdateJob === false}
/>
</EuiToolTip>
);
Expand Down

0 comments on commit 0863fb3

Please sign in to comment.