Migration of SchemeStore to return plain errors (#14836)

Automatic Merge
Этот коммит содержится в:
Rodrigo Villablanca
2020-06-23 00:56:35 -04:00
коммит произвёл GitHub
родитель a1547cfac5
Коммит 7bf6565ed2
13 изменённых файлов: 258 добавлений и 237 удалений

Просмотреть файл

@@ -8,6 +8,7 @@ import (
"encoding/json"
"fmt"
"io"
"net/http"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/pkg/errors"
@@ -44,7 +45,7 @@ func (a *App) ResetPermissionsSystem() *model.AppError {
// Purge all schemes from the database.
if err := a.Srv().Store.Scheme().PermanentDeleteAll(); err != nil {
return err
return model.NewAppError("ResetPermissionsSystem", "app.scheme.permanent_delete_all.app_error", nil, err.Error(), http.StatusInternalServerError)
}
// Purge all roles from the database.