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] Data Frames: Fixes access denied messages. #37178

Merged

Conversation

walterra
Copy link
Contributor

@walterra walterra commented May 27, 2019

Summary

Fixes #36363.

With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.

This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

@walterra walterra added bug Fixes for quality problems that affect the customer experience review :ml v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.2.0 v7.3.0 Feature:Transforms ML transforms labels May 27, 2019
@walterra walterra requested a review from a team as a code owner May 27, 2019 09:56
@walterra walterra self-assigned this May 27, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra requested a review from pheyos May 27, 2019 13:09
const kbnUrl = $injector.get<any>('kbnUrl');

const goToKibana = () => {
window.location.href = uiChrome.getBasePath() + kbnBaseUrl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason this is not using a template literal to create the href?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy pasted this from the general access denied page for anomaly detection :)

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡️

@walterra walterra merged commit 4095908 into elastic:master May 28, 2019
@walterra walterra deleted the ml-data-frames-fix-permission-error-message branch May 28, 2019 15:09
walterra added a commit to walterra/kibana that referenced this pull request May 28, 2019
With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.

This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.
walterra added a commit to walterra/kibana that referenced this pull request May 28, 2019
With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.

This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.
walterra added a commit that referenced this pull request May 28, 2019
With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.

This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.
walterra added a commit that referenced this pull request May 28, 2019
With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.

This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.
jkakavas pushed a commit to jkakavas/kibana that referenced this pull request May 30, 2019
With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.

This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Transforms ML transforms :ml release_note:skip Skip the PR/issue when compiling release notes review v7.2.0 v7.3.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Data Frame UI - wrong error message on missing permissions
3 participants