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

fix(slo): enforce write capabilities on welcome and form pages #157153

Merged
merged 2 commits into from
May 9, 2023

Conversation

kdelemme
Copy link
Contributor

@kdelemme kdelemme commented May 9, 2023

Resolves #157150

Summary

This PR fixes the welcome and form pages when a user has not the write capabilities:

  • The Create SLO button is disabled on the welcome page
  • User is redirected back to slo list page when accessing the form page (through URL for example)

@kdelemme kdelemme added backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.9.0 labels May 9, 2023
@kdelemme kdelemme self-assigned this May 9, 2023
@kdelemme kdelemme marked this pull request as ready for review May 9, 2023 12:36
@kdelemme kdelemme requested a review from a team as a code owner May 9, 2023 12:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@kdelemme kdelemme added the release_note:skip Skip the PR/issue when compiling release notes label May 9, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 971.3KB 971.4KB +75.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 399 403 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 479 483 +4
total +6

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

cc @kdelemme

Copy link
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

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

@kdelemme When accessing http://localhost:5601/app/observability/slos with "None" SLO privileges, the screen is flickering. Did you intend to fix that too in this PR?

@kdelemme
Copy link
Contributor Author

kdelemme commented May 9, 2023

@benakansara Not this one in this PR.

Copy link
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

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

LGTM

@kdelemme kdelemme merged commit 0743600 into elastic:main May 9, 2023
@kdelemme kdelemme deleted the fix/disable-create-slo-welcome branch May 9, 2023 14:17
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 9, 2023
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 9, 2023
…157153) (#157183)

# Backport

This will backport the following commits from `main` to `8.8`:
- [fix(slo): enforce write capabilities on welcome and form pages
(#157153)](#157153)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2023-05-09T14:17:42Z","message":"fix(slo):
enforce write capabilities on welcome and form pages
(#157153)","sha":"07436005b8ca1d54cece0d25000839f49304d62b","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
Actionable
Observability","backport:prev-minor","v8.9.0"],"number":157153,"url":"https://github.com/elastic/kibana/pull/157153","mergeCommit":{"message":"fix(slo):
enforce write capabilities on welcome and form pages
(#157153)","sha":"07436005b8ca1d54cece0d25000839f49304d62b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157153","number":157153,"mergeCommit":{"message":"fix(slo):
enforce write capabilities on welcome and form pages
(#157153)","sha":"07436005b8ca1d54cece0d25000839f49304d62b"}}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SLO] Welcome page "Create SLO" button must be disabled when insufficient permission
6 participants