-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 support for deprecated roles #57209
Add support for deprecated roles #57209
Conversation
f32c39c
to
e5141b7
Compare
e5141b7
to
58a25fa
Compare
Pinging @elastic/kibana-security (Team:Security) |
/** | ||
* Returns whether given role is editable through the UI or not. | ||
* | ||
* @param role the Role as returned by roles API | ||
*/ | ||
export function isReadOnlyRole(role: Partial<Role>): boolean { | ||
return isReservedRole(role) || (role._transform_error?.length ?? 0) > 0; | ||
export function isRoleReadOnly(role: Partial<Role>): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note Just a rename to be more consistent with the other functions in this module
@@ -14,11 +14,11 @@ import { PersonalInfo } from './personal_info'; | |||
|
|||
interface Props { | |||
authc: AuthenticationServiceSetup; | |||
apiClient: PublicMethodsOf<UserAPIClient>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: just a rename to make the client instance clearer, since this component now requires two API clients
@@ -120,6 +120,7 @@ export class DocLinksService { | |||
}, | |||
management: { | |||
kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`, | |||
dashboardSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-dashboard-settings`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to support the Deprecated
badge for the xpackDashboardMode:roles
Advanced Setting added in:
defaultMessage="Enable mapping" | ||
/> | ||
} | ||
label={i18n.translate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note This just resolves an EUI warning where EuiSwitch
's label
must be a string when showLabel={false}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for platform changes
@elastic/kibana-security this is ready for review |
ACK: reviewing |
x-pack/plugins/security/public/management/role_combo_box/role_combo_box.tsx
Show resolved
Hide resolved
...s/security/public/management/role_mappings/edit_role_mapping/role_selector/role_selector.tsx
Show resolved
Hide resolved
...security/public/management/role_mappings/role_mappings_grid/role_mappings_grid_page.test.tsx
Show resolved
Hide resolved
x-pack/plugins/security/public/management/roles/roles_grid/roles_grid_page.tsx
Show resolved
Hide resolved
x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx
Show resolved
Hide resolved
x-pack/plugins/security/public/management/users/users_grid/users_grid_page.tsx
Show resolved
Hide resolved
x-pack/plugins/security/public/management/users/users_grid/users_grid_page.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snapshot changes.
LGTM
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@kobelb this is ready for another pass. Flaky test result appears unrelated to any changes here. |
…ort-deprecated-roles
Here are some suggestions to tighten up the text a bit: Tooltip Roles Feature privileges Mapping |
…ort-deprecated-roles
Thanks @gchaps! I'd like to make the copy for the "Tooltip" and "Feature privileges" suggestions match, as they're currently generated using a shared mechanism. Would you be ok replacing
with
More generically, the message looks like this:
Where |
…o/kibana into security/support-deprecated-roles
@legrego good idea to make the text match. I edited the tooltip to match our marketing guidelines--we prefer to use Dashboard without "feature" or "app". Also, it makes the text shorter. The kibana_dashboard_only_user role is deprecated. Configure a custom role to grant access to Dashboard. |
…ort-deprecated-roles
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Add support for deprecated roles * address PR feedback * remove unused import * copy edits * fix snapshots Co-authored-by: Elastic Machine <[email protected]>
Opened corresponding Elasticsearch PR to update deprecation reasons: elastic/elasticsearch#53074 |
* Add support for deprecated roles * address PR feedback * remove unused import * copy edits * fix snapshots Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
Updates the User, Role, and Role Mappings management pages to warn about the use of deprecated roles.
Resolves #25722
Dashboard Only Mode Roles
Deprecates the advanced setting:
User Grid Page
Edit User Page
Role Grid Page
View Deprecated Role
Role Mappings Grid Page
Edit Role Mapping Page