Skip to content

[licensing] Treat any case where we do not have a valid license as if no license is installed #8412

Closed
@corneliusludmann

Description

@corneliusludmann

Currently, an invalid license prevents any users to sign up. An installation with an invalid license should not be in a worse position than an installation with no license at all.

We have this behavior already to some extent so that we don't return an invalid license but a default license for some cases, e.g. here:

if lic.ValidUntil.Before(time.Now()) {
return defaultReplicatedLicense()
}

However, there are some cases where we don't have a valid license, e.g. when the license server from Replicated is not reachable etc.

I would propose to change the implementation like this:

  • Don't return the default license in newReplicatedEvaluator() but return the invalid license with the proper reason/explanation why the license is invalid.
  • In the function HasEnoughSeats, don't respond with false when the license is invalid but call HasEnoughSeats from the default license in that case (same for other methods like Enabled(...)).

That has the following advantages:

Metadata

Metadata

Assignees

Labels

team: deliveryIssue belongs to the self-hosted teamtype: improvementImproves an existing feature or existing code

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions