Skip to content

Commit

Permalink
[Security Solution][Bug] - Disable alert table RBAC until fields sort…
Browse files Browse the repository at this point in the history
…ed (elastic#108034) (elastic#108116)

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
michaelolo24 and kibanamachine authored Aug 10, 2021
1 parent d470500 commit 00dc2ac
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { ALERT_OWNER, RULE_ID, SPACE_IDS } from '@kbn/rule-data-utils';
import { map, mergeMap, catchError } from 'rxjs/operators';
import { from } from 'rxjs';
import {
isValidFeatureId,
// TODO: Undo comment in fix here https://github.com/elastic/kibana/pull/107857
// isValidFeatureId,
mapConsumerToIndexName,
AlertConsumers,
} from '@kbn/rule-data-utils/target/alerts_as_data_rbac';
Expand Down Expand Up @@ -49,7 +50,9 @@ export const timelineSearchStrategyProvider = <T extends TimelineFactoryQueryTyp
search: (request, options, deps) => {
const factoryQueryType = request.factoryQueryType;
const entityType = request.entityType;
const alertConsumers = request.alertConsumers;
let alertConsumers = request.alertConsumers;
// TODO: Remove in fix here https://github.com/elastic/kibana/pull/107857
alertConsumers = undefined;

if (factoryQueryType == null) {
throw new Error('factoryQueryType is required');
Expand All @@ -58,7 +61,9 @@ export const timelineSearchStrategyProvider = <T extends TimelineFactoryQueryTyp
const queryFactory: TimelineFactory<T> = timelineFactory[factoryQueryType];

if (alertConsumers != null && entityType != null && entityType === EntityType.ALERTS) {
const allFeatureIdsValid = alertConsumers.every((id) => isValidFeatureId(id));
// TODO: Thist won't be hit since alertConsumers = undefined
// TODO: remove in fix here https://github.com/elastic/kibana/pull/107857
const allFeatureIdsValid = null; // alertConsumers.every((id) => isValidFeatureId(id));

if (!allFeatureIdsValid) {
throw new Error('An invalid alerts consumer feature id was provided');
Expand Down

0 comments on commit 00dc2ac

Please sign in to comment.