From 4724e039a2f005f9ab5d5d1a99f4aabbdbb31632 Mon Sep 17 00:00:00 2001 From: Evgenii Novozhilov Date: Wed, 26 Jun 2024 17:32:06 +0300 Subject: [PATCH] trusted project: respect intellij settings controlling project trustness Do not show dialogs to trust if trust checks are disabled in the intellij platform. Project creation code is handled in a custom way in bazel plugin because any project is trusted by default in intellij. However, bazel plugin always creates a fake project in .cl/ij/aswb folder, so the plugin should handle trust checks by itself. --- .../idea/blaze/base/project/TrustAwareProjectCreator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/src/com/google/idea/blaze/base/project/TrustAwareProjectCreator.java b/base/src/com/google/idea/blaze/base/project/TrustAwareProjectCreator.java index f6faf0d277c..44e044700ba 100644 --- a/base/src/com/google/idea/blaze/base/project/TrustAwareProjectCreator.java +++ b/base/src/com/google/idea/blaze/base/project/TrustAwareProjectCreator.java @@ -48,6 +48,10 @@ public Optional createProject(ProjectBuilder builder, String name, Stri /** Returns true if the user has trusted the project. */ @Override public boolean canCreateProject(@Nullable BuildSystemName buildSystemName) { + if (TrustedProjects.isTrustedCheckDisabled()) { + return true; + } + var trustText = IdeBundle.message("untrusted.project.dialog.trust.button"); var dontOpenText = IdeBundle.message("untrusted.project.open.dialog.cancel.button");