[MM-45580] Send deliquency since to end users and allow new notify admin request
Этот коммит содержится в:
@@ -81,6 +81,7 @@ func getSubscription(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
DNS: "",
|
DNS: "",
|
||||||
IsPaidTier: "",
|
IsPaidTier: "",
|
||||||
LastInvoice: &model.Invoice{},
|
LastInvoice: &model.Invoice{},
|
||||||
|
DelinquentSince: subscription.DelinquentSince,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ func Test_getCloudLimits(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Test_GetSubscription(t *testing.T) {
|
func Test_GetSubscription(t *testing.T) {
|
||||||
|
deliquencySince := int64(2000000000)
|
||||||
|
|
||||||
subscription := &model.Subscription{
|
subscription := &model.Subscription{
|
||||||
ID: "MySubscriptionID",
|
ID: "MySubscriptionID",
|
||||||
CustomerID: "MyCustomer",
|
CustomerID: "MyCustomer",
|
||||||
@@ -125,6 +127,7 @@ func Test_GetSubscription(t *testing.T) {
|
|||||||
IsPaidTier: "false",
|
IsPaidTier: "false",
|
||||||
TrialEndAt: 2000000000,
|
TrialEndAt: 2000000000,
|
||||||
LastInvoice: &model.Invoice{},
|
LastInvoice: &model.Invoice{},
|
||||||
|
DelinquentSince: &deliquencySince,
|
||||||
}
|
}
|
||||||
|
|
||||||
userFacingSubscription := &model.Subscription{
|
userFacingSubscription := &model.Subscription{
|
||||||
@@ -141,6 +144,7 @@ func Test_GetSubscription(t *testing.T) {
|
|||||||
IsPaidTier: "",
|
IsPaidTier: "",
|
||||||
TrialEndAt: 2000000000,
|
TrialEndAt: 2000000000,
|
||||||
LastInvoice: &model.Invoice{},
|
LastInvoice: &model.Invoice{},
|
||||||
|
DelinquentSince: &deliquencySince,
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Run("NON Admin users receive the user facing subscription", func(t *testing.T) {
|
t.Run("NON Admin users receive the user facing subscription", func(t *testing.T) {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const (
|
|||||||
PaidFeatureUnlimitedBoardcards = MattermostPaidFeature("mattermost.feature.unlimited_board_cards")
|
PaidFeatureUnlimitedBoardcards = MattermostPaidFeature("mattermost.feature.unlimited_board_cards")
|
||||||
PaidFeatureAllProfessionalfeatures = MattermostPaidFeature("mattermost.feature.all_professional")
|
PaidFeatureAllProfessionalfeatures = MattermostPaidFeature("mattermost.feature.all_professional")
|
||||||
PaidFeatureAllEnterprisefeatures = MattermostPaidFeature("mattermost.feature.all_enterprise")
|
PaidFeatureAllEnterprisefeatures = MattermostPaidFeature("mattermost.feature.all_enterprise")
|
||||||
|
UpgradeDowngradeWorkspace = MattermostPaidFeature("mattermost.feature.upgrade_downgrade_workspace")
|
||||||
)
|
)
|
||||||
|
|
||||||
var validSKUs map[string]struct{} = map[string]struct{}{
|
var validSKUs map[string]struct{} = map[string]struct{}{
|
||||||
@@ -42,6 +43,7 @@ var paidFeatures map[MattermostPaidFeature]struct{} = map[MattermostPaidFeature]
|
|||||||
PaidFeatureUnlimitedBoardcards: {},
|
PaidFeatureUnlimitedBoardcards: {},
|
||||||
PaidFeatureAllProfessionalfeatures: {},
|
PaidFeatureAllProfessionalfeatures: {},
|
||||||
PaidFeatureAllEnterprisefeatures: {},
|
PaidFeatureAllEnterprisefeatures: {},
|
||||||
|
UpgradeDowngradeWorkspace: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
type NotifyAdminToUpgradeRequest struct {
|
type NotifyAdminToUpgradeRequest struct {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user