Skip to content

Conversation

@rmohan20
Copy link
Contributor

@rmohan20 rmohan20 commented Aug 1, 2022

Create an Unresolved CRUD/FLS violation when SFGE is unable to resolve an ApexValue

@rmohan20 rmohan20 requested a review from jfeingold35 August 1, 2022 19:04
sourceCode,
expectUnresolvedCrudFls(3, FlsConstants.FlsValidationType.READ));
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding more test cases to get a repro of how far we can resolve apex values.

Comment on lines +166 to +173
if (LOGGER.isWarnEnabled()) {
LOGGER.warn(
"TODO: Apex value not detected for dml's child vertex: " + childVertex);
// TODO: add telemetry
}
violations.add(
FlsViolationCreatorUtil.createUnresolvedCrudFlsViolation(
validationType, vertex));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related action happens here

Comment on lines +180 to +182
violations.add(
FlsViolationCreatorUtil.createUnresolvedCrudFlsViolation(
validationType, vertex));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is possibly an unexpected situation - we haven't seen it anywhere or had a repro, but I'm modifying it so that users don't see an internal error for this.

@rmohan20 rmohan20 merged commit 3c0a94f into dev-3 Aug 1, 2022
@stephen-carter-at-sf stephen-carter-at-sf deleted the rm/dmlVariableExpr branch May 17, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants