Skip to content

Commit

Permalink
fix Bug 71494
Browse files Browse the repository at this point in the history
  • Loading branch information
andreysavihin committed Nov 22, 2024
1 parent 8c54366 commit 5de3a1a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,20 @@ private async Task<CommandResponse> GetDocumentServiceLicenseAsync(bool useCache
public async Task<bool> 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<string, DateTime>, License)> GetLicenseQuotaAsync()
Expand Down

0 comments on commit 5de3a1a

Please sign in to comment.