From 5de3a1a5d663c7be0fcc99640b6c6698c18984f7 Mon Sep 17 00:00:00 2001 From: Andrey Savihin Date: Fri, 22 Nov 2024 20:02:17 +0300 Subject: [PATCH] fix Bug 71494 --- .../Core/Helpers/DocumentServiceLicense.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs b/products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs index bdec0077d78..1dd1b116512 100644 --- a/products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs +++ b/products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs @@ -76,7 +76,20 @@ private async Task GetDocumentServiceLicenseAsync(bool useCache public async Task ValidateLicense() { var commandResponse = await GetDocumentServiceLicenseAsync(false); - return commandResponse == null || commandResponse.Error == ErrorTypes.NoError; + + if (commandResponse == null) + { + return true; + } + + if (commandResponse.Error != ErrorTypes.NoError) + { + return false; + } + + return commandResponse.Server != null && + (commandResponse.Server.ResultType == CommandResponse.ServerInfo.ResultTypes.Success || + commandResponse.Server.ResultType == CommandResponse.ServerInfo.ResultTypes.SuccessLimit); } public async Task<(Dictionary, License)> GetLicenseQuotaAsync()