mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
Add Service Banners (#5272)
This commit is contained in:
@ -113,6 +113,7 @@ type LicenseOptions struct {
|
||||
HighAvailability bool
|
||||
MultipleGitAuth bool
|
||||
ExternalProvisionerDaemons bool
|
||||
ServiceBanners bool
|
||||
}
|
||||
|
||||
// AddLicense generates a new license with the options provided and inserts it.
|
||||
@ -164,6 +165,11 @@ func GenerateLicense(t *testing.T, options LicenseOptions) string {
|
||||
externalProvisionerDaemons = 1
|
||||
}
|
||||
|
||||
serviceBanners := int64(0)
|
||||
if options.ServiceBanners {
|
||||
serviceBanners = 1
|
||||
}
|
||||
|
||||
c := &license.Claims{
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
Issuer: "test@testing.test",
|
||||
@ -186,6 +192,7 @@ func GenerateLicense(t *testing.T, options LicenseOptions) string {
|
||||
TemplateRBAC: rbacEnabled,
|
||||
MultipleGitAuth: multipleGitAuth,
|
||||
ExternalProvisionerDaemons: externalProvisionerDaemons,
|
||||
ServiceBanners: serviceBanners,
|
||||
},
|
||||
}
|
||||
tok := jwt.NewWithClaims(jwt.SigningMethodEdDSA, c)
|
||||
|
Reference in New Issue
Block a user