Skip to content

Commit

Permalink
use showAdditionalPermissionsMessage prop name
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Nov 19, 2024
1 parent c49dba7 commit 303dcf5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -380,7 +380,7 @@ export class FeatureTable extends Component<Props, State> {
};

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',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class SimplePrivilegeSection extends Component<Props, State> {
privilegeIndex={this.props.role.kibana.findIndex((k) =>
isGlobalPrivilegeDefinition(k)
)}
canAccessRoleManagement={true}
showAdditionalPermissionsMessage={true}
canCustomizeSubFeaturePrivileges={this.props.canCustomizeSubFeaturePrivileges}
allSpacesSelected
disabled={!this.props.editable}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class PrivilegeSpaceForm extends Component<Props, State> {
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)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ export const PrivilegesRolesForm: FC<PrivilegesRolesFormProps> = (props) => {
canCustomizeSubFeaturePrivileges={
license?.getFeatures().allowSubFeaturePrivileges ?? false
}
canAccessRoleManagement={false}
showAdditionalPermissionsMessage={false}
/>
)}
</React.Fragment>
Expand Down

0 comments on commit 303dcf5

Please sign in to comment.