Deprecate admin advisor (#26045)
* Deprecate admin advisor * Webapp portion * More webapp deprecation * More cleanup * Linting * emoved metric ack dialog from annoucenemet bar * Cleanued up uninsed i18n strings * Updated test * fixed types * Updating server test * Updated i18n * Updated cypress test: * Updated cypress test: --------- Co-authored-by: harshil Sharma <harshilsharma63@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dc8fc773dc
Коммит
e9b9d4ff60
@@ -160,35 +160,6 @@ func (a *App) CreateBot(c request.CTX, bot *model.Bot) (*model.Bot, *model.AppEr
|
||||
return savedBot, nil
|
||||
}
|
||||
|
||||
func (a *App) GetWarnMetricsBot(rctx request.CTX) (*model.Bot, *model.AppError) {
|
||||
perPage := 1
|
||||
userOptions := &model.UserGetOptions{
|
||||
Page: 0,
|
||||
PerPage: perPage,
|
||||
Role: model.SystemAdminRoleId,
|
||||
Inactive: false,
|
||||
}
|
||||
|
||||
sysAdminList, err := a.GetUsersFromProfiles(userOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(sysAdminList) == 0 {
|
||||
return nil, model.NewAppError("GetWarnMetricsBot", "app.bot.get_warn_metrics_bot.empty_admin_list.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
T := i18n.GetUserTranslations(sysAdminList[0].Locale)
|
||||
warnMetricsBot := &model.Bot{
|
||||
Username: model.BotWarnMetricBotUsername,
|
||||
DisplayName: T("app.system.warn_metric.bot_displayname"),
|
||||
Description: "",
|
||||
OwnerId: sysAdminList[0].Id,
|
||||
}
|
||||
|
||||
return a.getOrCreateBot(rctx, warnMetricsBot)
|
||||
}
|
||||
|
||||
func (a *App) GetSystemBot(rctx request.CTX) (*model.Bot, *model.AppError) {
|
||||
perPage := 1
|
||||
userOptions := &model.UserGetOptions{
|
||||
|
||||
Ссылка в новой задаче
Block a user