From ac75405f21d44875e92bf41dada98c667801bee6 Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 28 Feb 2024 09:56:32 +0300 Subject: [PATCH 1/3] chore: update browserlist * chore: update browserlist --- webapp/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/yarn.lock b/webapp/yarn.lock index b989a7ca8b..c1d2536743 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -6429,9 +6429,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001565: - version "1.0.30001566" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz#61a8e17caf3752e3e426d4239c549ebbb37fef0d" - integrity sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA== + version "1.0.30001591" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001591.tgz" + integrity sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ== capital-case@^1.0.4: version "1.0.4" From 9fe091d352c5f95e6131e93b186f47e41520e482 Mon Sep 17 00:00:00 2001 From: Alexander Skoblikov Date: Wed, 28 Feb 2024 21:40:13 +0400 Subject: [PATCH 2/3] CB-4773 show license validation error (#2423) Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> --- .../src/io/cloudbeaver/server/CBApplication.java | 5 +++++ .../src/io/cloudbeaver/service/WebServiceBindingBase.java | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBApplication.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBApplication.java index bb2539b252..7c394e34c4 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBApplication.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBApplication.java @@ -1216,6 +1216,11 @@ public boolean isLicenseValid() { return false; } + @Nullable + public String getLicenseStatus() { + return null; + } + /** * */ diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/WebServiceBindingBase.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/WebServiceBindingBase.java index 7449c5dc85..0ebe8b0610 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/WebServiceBindingBase.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/WebServiceBindingBase.java @@ -265,8 +265,13 @@ private void checkActionPermissions(@NotNull Method method, @NotNull WebAction w // Check license if (application.isLicenseRequired() && !application.isLicenseValid()) { if (!ArrayUtils.contains(reqPermissions, DBWConstants.PERMISSION_ADMIN)) { + String errorMessage = "Invalid server license"; + String licenseStatus = application.getLicenseStatus(); + if (licenseStatus != null) { + errorMessage = errorMessage + ": " + licenseStatus; + } // Only admin permissions are allowed - throw new DBWebExceptionLicenseRequired("Invalid server license"); + throw new DBWebExceptionLicenseRequired(errorMessage); } } // Check permissions From 62510fe18dfbfe846869376d54ecaf0b110f7e11 Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Thu, 29 Feb 2024 18:06:57 +0100 Subject: [PATCH 3/3] Cb 4777 te log viewer access denied and anonymous access restricted errors after login (#2431) * CB-4777 fix: removes an "anonymous access restricted" error from log viewer * CB-4777 fix: isUserAvailable for userInfoService * CB-4777 chore: code cleanup * CB-4777 do not call rm api if not authorized in sm * CB-4777 revert changes * CB-4777 revert changes --------- Co-authored-by: s.teleshev Co-authored-by: Aleksandr Skoblikov --- .../src/io/cloudbeaver/model/session/BaseWebSession.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/BaseWebSession.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/BaseWebSession.java index 84fcd4a851..86c8fd33c7 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/BaseWebSession.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/BaseWebSession.java @@ -114,7 +114,9 @@ public synchronized boolean updateSMSession(SMAuthInfo smAuthInfo) throws DBExce public synchronized void refreshUserData() { try { userContext.refreshPermissions(); - userContext.refreshAccessibleProjects(); + if (userContext.isAuthorizedInSecurityManager()) { + userContext.refreshAccessibleProjects(); + } } catch (DBException e) { addSessionError(e); log.error("Error refreshing accessible projects", e);