Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Fixes permissions checks for data visualizer create job links #55431

Merged

Conversation

peteharverson
Copy link
Contributor

@peteharverson peteharverson commented Jan 21, 2020

Summary

Fixes the check used to determine whether or not to show the 'Create job' links in the index-based data visualizer.

As well as checking for a full license and a time-based index, checks are now also made that the user has the canCreateJob privilege and there are ML nodes available. If any of these checks return false, the side panel containing the links to the advanced wizard and any modules is hidden:

image

For maintainers

Fixes #55178

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -131,7 +133,10 @@ export const Page: FC = () => {
const defaults = getDefaultPageState();

const [showActionsPanel] = useState(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove useState here since the value gets never updated and just do const showActionsPanel = ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 901a166

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest changes LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@peteharverson peteharverson merged commit b8b1c02 into elastic:master Jan 22, 2020
@peteharverson peteharverson deleted the ml-data-visualizer-create-job-perm branch January 22, 2020 13:07
peteharverson added a commit to peteharverson/kibana that referenced this pull request Jan 22, 2020
…lastic#55431)

* [ML] Fixes permissions checks for data visualizer create job links

* [ML] Edits to permissions check following review

* [ML] Revert unintentional additions
peteharverson added a commit to peteharverson/kibana that referenced this pull request Jan 22, 2020
…lastic#55431)

* [ML] Fixes permissions checks for data visualizer create job links

* [ML] Edits to permissions check following review

* [ML] Revert unintentional additions
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jan 22, 2020
…t-of-legacy

* 'master' of github.com:elastic/kibana:
  [Watcher] Add support for additional watch action statuses (elastic#55092)
  [ML] Fix entity controls update. (elastic#55524)
  [ML] Fixing ML's watcher integration (elastic#55439)
  [ML] Fixes permissions checks for data visualizer create job links (elastic#55431)
  [SearchProfiler] Move out of legacy (elastic#55331)

# Conflicts:
#	x-pack/plugins/watcher/server/models/action_status/action_status.js
peteharverson added a commit that referenced this pull request Jan 22, 2020
…55431) (#55559)

* [ML] Fixes permissions checks for data visualizer create job links

* [ML] Edits to permissions check following review

* [ML] Revert unintentional additions
peteharverson added a commit that referenced this pull request Jan 22, 2020
…55431) (#55558)

* [ML] Fixes permissions checks for data visualizer create job links

* [ML] Edits to permissions check following review

* [ML] Revert unintentional additions

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Data Visualizer - job creation active for machine_learning_user
5 participants