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 b79520d4ed037..37ae24cbab5de 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 @@ -195,84 +195,88 @@ export class PrivilegeSpaceForm extends Component { /> - - - - {this.getPrivilegeCallout()} - - - - - - 0 || !hasSelectedSpaces} - allSpacesSelected={this.state.selectedSpaceIds.includes(ALL_SPACES_ID)} - /> + {Boolean(this.state.selectedSpaceIds.length) && ( + <> + + + + {this.getPrivilegeCallout()} + + + + + + 0 || !hasSelectedSpaces} + allSpacesSelected={this.state.selectedSpaceIds.includes(ALL_SPACES_ID)} + /> + + )} {this.requiresGlobalPrivilegeWarning() && (