Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Add a new license type for OSS #186

Merged
merged 5 commits into from
Oct 29, 2021
Merged

Add a new license type for OSS #186

merged 5 commits into from
Oct 29, 2021

Conversation

noahingh
Copy link
Member

@noahingh noahingh commented Oct 28, 2021

Adding a new license type, OSS, avoids the API being blocked by the limit of license.

@noahingh noahingh added the component: server This issue or pull request is related to the feature of the server-side label Oct 28, 2021
@noahingh noahingh added this to the v0.3 milestone Oct 28, 2021
@noahingh noahingh changed the title Add a new license kind for OSS version Add a new license type for OSS version Oct 29, 2021
@noahingh noahingh changed the title Add a new license type for OSS version Add a new license type for OSS Oct 29, 2021
Comment on lines +40 to +42
Kind: LicenseKindOSS,
MemberCount: -1,
DeploymentCount: -1,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IsOverLimit of the OSS License always returns false.

func (l *License) IsOverLimit() bool {
return l.MemberCount > l.MemberLimit
return l.MemberCount > l.MemberLimit || l.DeploymentCount > l.DeploymentLimit
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add deployment limit to verify the license.

Comment on lines +37 to +40
if lic.IsOSS() {
return
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skip when the license is oss

@noahingh noahingh marked this pull request as ready for review October 29, 2021 12:54
@noahingh noahingh merged commit 0f94f87 into main Oct 29, 2021
@noahingh noahingh deleted the oss-license branch October 29, 2021 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: server This issue or pull request is related to the feature of the server-side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant