From 303dcf5b391d245feffc5c5cc57dcfc8eb6d485d Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Tue, 19 Nov 2024 08:05:14 -0700 Subject: [PATCH] use showAdditionalPermissionsMessage prop name --- .../src/kibana_privilege_table/feature_table.test.tsx | 2 +- .../src/kibana_privilege_table/feature_table.tsx | 4 ++-- .../simple_privilege_section/simple_privilege_section.tsx | 2 +- .../space_aware_privilege_section/privilege_space_form.tsx | 2 +- .../roles/component/space_assign_role_privilege_form.tsx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx index 3d277e91a7b2b..6e55fa7ed7bbf 100644 --- a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx +++ b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx @@ -54,7 +54,7 @@ const setup = (config: TestConfig) => { kibanaPrivileges={kibanaPrivileges} onChange={onChange} onChangeAll={onChangeAll} - canAccessRoleManagement={true} + showAdditionalPermissionsMessage={true} canCustomizeSubFeaturePrivileges={config.canCustomizeSubFeaturePrivileges} privilegeIndex={config.privilegeIndex} allSpacesSelected={true} diff --git a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx index f48c784d74236..9ee1ea3517dae 100644 --- a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx +++ b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx @@ -45,7 +45,7 @@ interface Props { privilegeIndex: number; onChange: (featureId: string, privileges: string[]) => void; onChangeAll: (privileges: string[]) => void; - canAccessRoleManagement: boolean; + showAdditionalPermissionsMessage: boolean; canCustomizeSubFeaturePrivileges: boolean; allSpacesSelected: boolean; disabled?: boolean; @@ -380,7 +380,7 @@ export class FeatureTable extends Component { }; private getCategoryHelpText = (category: AppCategory) => { - if (category.id === 'management' && this.props.canAccessRoleManagement) { + if (category.id === 'management' && this.props.showAdditionalPermissionsMessage) { return i18n.translate( 'xpack.security.management.editRole.featureTable.managementCategoryHelpText', { diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx index e0fd73bd0bf4c..b9f4fd8e474a4 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx @@ -226,7 +226,7 @@ export class SimplePrivilegeSection extends Component { privilegeIndex={this.props.role.kibana.findIndex((k) => isGlobalPrivilegeDefinition(k) )} - canAccessRoleManagement={true} + showAdditionalPermissionsMessage={true} canCustomizeSubFeaturePrivileges={this.props.canCustomizeSubFeaturePrivileges} allSpacesSelected disabled={!this.props.editable} diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx index 35ab95e1dee16..5946197d35d69 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx @@ -267,7 +267,7 @@ export class PrivilegeSpaceForm extends Component { onChangeAll={this.onChangeAllFeaturePrivileges} kibanaPrivileges={this.props.kibanaPrivileges} privilegeIndex={this.state.privilegeIndex} - canAccessRoleManagement={true} + showAdditionalPermissionsMessage={true} canCustomizeSubFeaturePrivileges={this.props.canCustomizeSubFeaturePrivileges} disabled={this.state.selectedBasePrivilege.length > 0 || !hasSelectedSpaces} allSpacesSelected={this.state.selectedSpaceIds.includes(ALL_SPACES_ID)} diff --git a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx index 50dec5dc5c6b7..84859631cdb77 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx @@ -603,7 +603,7 @@ export const PrivilegesRolesForm: FC = (props) => { canCustomizeSubFeaturePrivileges={ license?.getFeatures().allowSubFeaturePrivileges ?? false } - canAccessRoleManagement={false} + showAdditionalPermissionsMessage={false} /> )}