MM-10264: Adds CLI command to import and export permissions. (#8787)

* MM-10264: Adds CLI command to import and export permissions.

* MM-10264: Changes Scheme Name to DisplayName and adds Name slug field.

* MM-10264: Changes display name max size.

* MM-10264: Another merge fix.

* MM-10264: Changes for more Schemes methods checking for migration.

* MM-10264: More updates for Schemes migration checking.
Этот коммит содержится в:
Martin Kraft
2018-05-17 11:37:00 -04:00
коммит произвёл GitHub
родитель 463065c8ba
Коммит e0390632b3
14 изменённых файлов: 670 добавлений и 14 удалений

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

@@ -4,8 +4,10 @@
package app
import (
"github.com/mattermost/mattermost-server/model"
"net/http"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/store"
)
func (a *App) GetScheme(id string) (*model.Scheme, *model.AppError) {
@@ -146,3 +148,15 @@ func (a *App) IsPhase2MigrationCompleted() *model.AppError {
return nil
}
func (a *App) SchemesIterator(batchSize int) func() []*model.Scheme {
offset := 0
return func() []*model.Scheme {
var result store.StoreResult
if result = <-a.Srv.Store.Scheme().GetAllPage("", offset, batchSize); result.Err != nil {
return []*model.Scheme{}
}
offset += batchSize
return result.Data.([]*model.Scheme)
}
}