From 536891bc06d9ae9b6da202fbd898a9bacfa6a5dd Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Fri, 11 Oct 2024 16:01:00 +0200 Subject: [PATCH] CB-5744. Refactor after review --- .../src/io/cloudbeaver/model/app/WebAppConfiguration.java | 2 ++ .../service/security/CBEmbeddedSecurityController.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/WebAppConfiguration.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/WebAppConfiguration.java index ca09529a49..0e8fb8ef26 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/WebAppConfiguration.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/WebAppConfiguration.java @@ -44,6 +44,8 @@ public interface WebAppConfiguration { boolean isFeatureEnabled(String id); + String[] getEnabledFeatures(); + default boolean isSupportsCustomConnections() { return true; } diff --git a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java index 806dbd4e6b..25b5b1c5a0 100644 --- a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java +++ b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java @@ -1153,6 +1153,12 @@ public List getTeamMembersInfo(@NotNull String teamId) throws } } + @Nullable + @Override + public String[] getEnableFeatures() { + return application.getAppConfiguration().getEnabledFeatures(); + } + @NotNull private SMTeam fetchTeam(ResultSet dbResult) throws SQLException { return new SMTeam(