Skip to content

Commit 20d2d5f

Browse files
Mats-SXFlorentinD
andcommitted
Avoid restricting security context twice
Co-authored-by: Florentin Dörre <florentin.dorre@neo4j.com>
1 parent 203d0fb commit 20d2d5f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

legacy-cypher-projection/src/main/java/org/neo4j/gds/legacycypherprojection/CypherQueryEstimator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.util.Collection;
2828

2929
import static org.neo4j.gds.utils.StringFormatting.formatWithLocale;
30-
import static org.neo4j.internal.kernel.api.security.AccessMode.Static.READ;
3130

3231
public class CypherQueryEstimator {
3332

@@ -48,7 +47,7 @@ public EstimationResult getRelationshipEstimation(String relationshipQuery) {
4847
}
4948

5049
private EstimationResult runEstimationQuery(String query, Collection<String> reservedColumns) {
51-
return context.withRestrictedAccess(READ).apply((tx, ktx) -> {
50+
return context.apply((tx, ktx) -> {
5251
var explainQuery = formatWithLocale("EXPLAIN %s", query);
5352
try (var result = tx.execute(explainQuery)) {
5453
var estimatedRows = (Number) result.getExecutionPlanDescription().getArguments().get("EstimatedRows");

0 commit comments

Comments
 (0)