[MM-42713] - Remove cloud user limit restrictions (#19835)
* [MM-42713] - Remove cloud user limit restrictions * remove unused code * fix translations * feedback impl-1 * enterprise code clean up * feedback impl-2 * fix mocks * fix translations Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
67d57fc400
Коммит
fa56ee9d9a
@@ -7701,18 +7701,6 @@ func (c *Client4) GetSubscription() (*Subscription, *Response, error) {
|
||||
return subscription, BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) GetSubscriptionStats() (*SubscriptionStats, *Response, error) {
|
||||
r, err := c.DoAPIGet(c.cloudRoute()+"/subscription/stats", "")
|
||||
if err != nil {
|
||||
return nil, BuildResponse(r), err
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
var stats *SubscriptionStats
|
||||
json.NewDecoder(r.Body).Decode(&stats)
|
||||
return stats, BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) GetInvoicesForSubscription() ([]*Invoice, *Response, error) {
|
||||
r, err := c.DoAPIGet(c.cloudRoute()+"/subscription/invoices", "")
|
||||
if err != nil {
|
||||
@@ -7897,26 +7885,6 @@ func (c *Client4) UpdateThreadFollowForUser(userId, teamId, threadId string, sta
|
||||
return BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) SendAdminUpgradeRequestEmail() (*Response, error) {
|
||||
r, err := c.DoAPIPost(c.cloudRoute()+"/subscription/limitreached/invite", "")
|
||||
if err != nil {
|
||||
return BuildResponse(r), err
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
return BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) SendAdminUpgradeRequestEmailOnJoin() (*Response, error) {
|
||||
r, err := c.DoAPIPost(c.cloudRoute()+"/subscription/limitreached/join", "")
|
||||
if err != nil {
|
||||
return BuildResponse(r), err
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
return BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) GetAllSharedChannels(teamID string, page, perPage int) ([]*SharedChannel, *Response, error) {
|
||||
url := fmt.Sprintf("%s/%s?page=%d&per_page=%d", c.sharedChannelsRoute(), teamID, page, perPage)
|
||||
r, err := c.DoAPIGet(url, "")
|
||||
|
||||
@@ -11,8 +11,6 @@ const (
|
||||
EventTypeSendAdminWelcomeEmail = "send-admin-welcome-email"
|
||||
EventTypeTrialWillEnd = "trial-will-end"
|
||||
EventTypeTrialEnded = "trial-ended"
|
||||
JoinLimitation = "join"
|
||||
InviteLimitation = "invite"
|
||||
)
|
||||
|
||||
var MockCWS string
|
||||
@@ -180,12 +178,6 @@ type FailedPayment struct {
|
||||
type CloudWorkspaceOwner struct {
|
||||
UserName string `json:"username"`
|
||||
}
|
||||
type SubscriptionStats struct {
|
||||
RemainingSeats int `json:"remaining_seats"`
|
||||
IsPaidTier string `json:"is_paid_tier"`
|
||||
IsFreeTrial string `json:"is_free_trial"`
|
||||
}
|
||||
|
||||
type SubscriptionChange struct {
|
||||
ProductID string `json:"product_id"`
|
||||
}
|
||||
|
||||
@@ -904,7 +904,6 @@ type ExperimentalSettings struct {
|
||||
LinkMetadataTimeoutMilliseconds *int64 `access:"experimental_features,write_restrictable,cloud_restrictable"`
|
||||
RestrictSystemAdmin *bool `access:"experimental_features,write_restrictable"`
|
||||
UseNewSAMLLibrary *bool `access:"experimental_features,cloud_restrictable"`
|
||||
CloudUserLimit *int64 `access:"experimental_features,write_restrictable"`
|
||||
CloudBilling *bool `access:"experimental_features,write_restrictable"`
|
||||
EnableSharedChannels *bool `access:"experimental_features"`
|
||||
EnableRemoteClusterService *bool `access:"experimental_features"`
|
||||
@@ -931,11 +930,6 @@ func (s *ExperimentalSettings) SetDefaults() {
|
||||
s.RestrictSystemAdmin = NewBool(false)
|
||||
}
|
||||
|
||||
if s.CloudUserLimit == nil {
|
||||
// User limit 0 is treated as no limit
|
||||
s.CloudUserLimit = NewInt64(0)
|
||||
}
|
||||
|
||||
if s.CloudBilling == nil {
|
||||
s.CloudBilling = NewBool(false)
|
||||
}
|
||||
|
||||
@@ -16,9 +16,6 @@ type FeatureFlags struct {
|
||||
// all other values as false.
|
||||
TestBoolFeature bool
|
||||
|
||||
// Toggle on and off scheduled jobs for cloud user limit emails see MM-29999
|
||||
CloudDelinquentEmailJobsEnabled bool
|
||||
|
||||
// Toggle on and off support for Collapsed Threads
|
||||
CollapsedThreads bool
|
||||
|
||||
@@ -74,7 +71,6 @@ type FeatureFlags struct {
|
||||
func (f *FeatureFlags) SetDefaults() {
|
||||
f.TestFeature = "off"
|
||||
f.TestBoolFeature = false
|
||||
f.CloudDelinquentEmailJobsEnabled = false
|
||||
f.CollapsedThreads = true
|
||||
f.EnableRemoteClusterService = false
|
||||
f.AppsEnabled = false
|
||||
|
||||
@@ -34,9 +34,6 @@ const (
|
||||
SystemFirstAdminSetupComplete = "FirstAdminSetupComplete"
|
||||
AwsMeteringReportInterval = 1
|
||||
AwsMeteringDimensionUsageHrs = "UsageHrs"
|
||||
UserLimitOverageCycleEndDate = "UserLimitOverageCycleEndDate"
|
||||
OverUserLimitForgivenCount = "OverUserLimitForgivenCount"
|
||||
OverUserLimitLastEmailSent = "OverUserLimitLastEmailSent"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Ссылка в новой задаче
Block a user