MM-40817: Use license interface in Channels (#19678)
* MM-40817: Use license interface in Channels https://mattermost.atlassian.net/browse/MM-40817 ```release-note NONE ``` Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
06c2aa70b0
Коммит
856f9b11af
@@ -88,7 +88,7 @@ func generateSupportPacket(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// Checking to see if the server has a e10 or e20 license (this feature is only permitted for servers with licenses)
|
||||
if c.App.Srv().License() == nil {
|
||||
if c.App.Channels().License() == nil {
|
||||
c.Err = model.NewAppError("Api4.generateSupportPacket", "api.no_license", nil, "", http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
@@ -759,7 +759,7 @@ func getWarnMetricsStatus(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
license := c.App.Srv().License()
|
||||
license := c.App.Channels().License()
|
||||
if license != nil {
|
||||
mlog.Debug("License is present, skip.")
|
||||
return
|
||||
@@ -789,7 +789,7 @@ func sendWarnMetricAckEmail(c *Context, w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
license := c.App.Srv().License()
|
||||
license := c.App.Channels().License()
|
||||
if license != nil {
|
||||
mlog.Debug("License is present, skip.")
|
||||
return
|
||||
@@ -831,7 +831,7 @@ func requestTrialLicenseAndAckWarnMetric(c *Context, w http.ResponseWriter, r *h
|
||||
return
|
||||
}
|
||||
|
||||
license := c.App.Srv().License()
|
||||
license := c.App.Channels().License()
|
||||
if license != nil {
|
||||
mlog.Debug("License is present, skip.")
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user