Skip to content

Commit

Permalink
trusted project: respect intellij settings controlling project trustness
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ujohnny committed Jun 26, 2024
1 parent 3c63e97 commit 4724e03
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public Optional<Project> 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");

Expand Down

0 comments on commit 4724e03

Please sign in to comment.