Removed post limit warning banner (#27036)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cef7826fa8
Коммит
13d9a9b6cc
@@ -14,8 +14,6 @@ import (
|
||||
const (
|
||||
maxUsersLimit = 10_000
|
||||
maxUsersHardLimit = 11_000
|
||||
|
||||
maxPostLimit = 5_000_000
|
||||
)
|
||||
|
||||
func (a *App) GetServerLimits() (*model.ServerLimits, *model.AppError) {
|
||||
@@ -33,17 +31,6 @@ func (a *App) GetServerLimits() (*model.ServerLimits, *model.AppError) {
|
||||
limits.MaxUsersHardLimit = maxUsersHardLimit
|
||||
}
|
||||
|
||||
if a.shouldShowPostLimits() {
|
||||
postCount, appErr := a.Srv().Store().Post().AnalyticsPostCount(&model.PostCountOptions{ExcludeDeleted: true})
|
||||
if appErr != nil {
|
||||
mlog.Error("Failed to get post count from database", mlog.String("error", appErr.Error()))
|
||||
return nil, model.NewAppError("GetServerLimits", "app.limits.get_server_limits.post_count.store_error", nil, "", http.StatusInternalServerError).Wrap(appErr)
|
||||
}
|
||||
|
||||
limits.MaxPostLimit = maxPostLimit
|
||||
limits.PostCount = postCount
|
||||
}
|
||||
|
||||
return limits, nil
|
||||
}
|
||||
|
||||
@@ -55,14 +42,6 @@ func (a *App) shouldShowUserLimits() bool {
|
||||
return a.License() == nil
|
||||
}
|
||||
|
||||
func (a *App) shouldShowPostLimits() bool {
|
||||
if maxPostLimit == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
return a.License() == nil
|
||||
}
|
||||
|
||||
func (a *App) isHardUserLimitExceeded() (bool, *model.AppError) {
|
||||
userLimits, appErr := a.GetServerLimits()
|
||||
if appErr != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user