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

Add readonly view to user management #143438

Merged
merged 4 commits into from Oct 19, 2022

Conversation

thomheymann
Copy link
Contributor

@thomheymann thomheymann commented Oct 17, 2022

Resolves #141799

Summary

Add readonly view to manage users screen.

Components

  • useCapabilities - Returns capabilities for a specific feature, or alternatively the entire capabilities object.
  • useBadge - Renders a badge in the Kibana chrome.
  • ReadonlyBadge - Renders a readonly badge in the Kibana chrome for a given feature when user does not have save privileges.

Screenshots

Users

Screenshot 2022-10-17 at 12 13 30

Edit user

Screenshot 2022-10-17 at 12 13 50

@thomheymann thomheymann added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! backport:skip This commit does not require backporting v8.6.0 release_note:enhancement labels Oct 17, 2022
@thomheymann thomheymann marked this pull request as ready for review October 18, 2022 09:02
@thomheymann thomheymann requested a review from a team as a code owner October 18, 2022 09:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@watson watson self-requested a review October 18, 2022 12:15
Copy link
Member

@watson watson left a comment

Choose a reason for hiding this comment

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

I like your reusable components!

Besides a few questions that I added as comments, I only found a single bug: Each role in the "Roles" column in the users table is clickable. It links to the edit-role screen. I guess it should link to the view-role screen in this case. But I'm not sure if the PR that introduces a read-only mode for roles has already been merged?

@@ -69,7 +74,6 @@ export class UsersGridPage extends Component<Props, State> {
isTableLoading: false,
};
}

Copy link
Member

Choose a reason for hiding this comment

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

Nit: did you mean to delete this line?

Copy link
Member

@watson watson left a comment

Choose a reason for hiding this comment

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

While this PR technically should depend on a read-only view for the role screen, it's not a big deal as 1) that PR will land in main soon after this one, and 2) this read_security permission is still rather unknown.

@thomheymann
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
security 466 469 +3

Async chunks

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

id before after diff
security 536.7KB 537.0KB +345.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
security 56.6KB 57.4KB +859.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
security 21 23 +2

Total ESLint disabled count

id before after diff
security 23 25 +2

History

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

@thomheymann thomheymann merged commit 53f3034 into elastic:main Oct 19, 2022
guskovaue pushed a commit to guskovaue/kibana that referenced this pull request Oct 22, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
e40pud pushed a commit to e40pud/kibana that referenced this pull request Oct 24, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Users/Roles/API Keys release_note:enhancement Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce read-only view for User Management
6 participants