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