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

Add expired license restrictions and new plan#47251

Merged
mrnugget merged 14 commits into
mainfrom
pjlast/expired-license-restrictions
Feb 1, 2023
Merged

Add expired license restrictions and new plan#47251
mrnugget merged 14 commits into
mainfrom
pjlast/expired-license-restrictions

Conversation

@pjlast

@pjlast pjlast commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Plans now have an ExpiredFeatures as well as a Features field, which allows us to specific features to remain active when a plan expires.

The 3 day grace period after a license has expired has been removed. Instead, a site-wide warning will be displayed one week before a license expires. After the expiry date is reached, Sourcegraph usage will be restricted.

Users' admin level cannot be modified when a license is expired.

See Loom: https://www.loom.com/share/9730f92598534c26932b8b07f683f502

Possible TODOs:

  • Add ExpiredFeatures to all the other licenses. Possibly the same two (SSO + ACLs) where applicable
  • Do a main-dry-run to test the integration tests. I don't know if they don't bother using unexpired licenses.

Test plan

Update failing tests

Comment thread enterprise/cmd/frontend/internal/licensing/enforcement/users.go Outdated
Comment thread enterprise/internal/licensing/data.go
Comment thread enterprise/internal/licensing/features.go Outdated
Comment thread enterprise/cmd/frontend/internal/licensing/enforcement/users.go Outdated
Comment thread enterprise/internal/licensing/data.go
@kopancek kopancek marked this pull request as ready for review February 1, 2023 12:57
@sourcegraph-bot

sourcegraph-bot commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 0e47fba...d703eae.

Notify File(s)
@unknwon enterprise/cmd/frontend/internal/authz/init.go
enterprise/cmd/frontend/internal/licensing/enforcement/users.go
enterprise/cmd/frontend/internal/licensing/enforcement/users_test.go
enterprise/cmd/frontend/internal/licensing/init/init.go
enterprise/internal/license/license.go
enterprise/internal/licensing/data.go
enterprise/internal/licensing/features.go
enterprise/internal/licensing/features_test.go
enterprise/internal/licensing/plans.go

@unknwon unknwon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blind approval because I did not look at the code, but the demo looks great though 🎉

@mrnugget mrnugget enabled auto-merge (squash) February 1, 2023 13:26
@mrnugget mrnugget merged commit 6cef2a1 into main Feb 1, 2023
@mrnugget mrnugget deleted the pjlast/expired-license-restrictions branch February 1, 2023 13:31
mrnugget added a commit that referenced this pull request Feb 1, 2023
Co-authored-by: Milan Freml <milan.freml@sourcegraph.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants