Refactors migrations check. (#8814)
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
c6ba5c32d6
Коммит
eb78d273f3
13
app/app.go
13
app/app.go
@@ -92,6 +92,8 @@ type App struct {
|
||||
clientConfig map[string]string
|
||||
clientConfigHash string
|
||||
diagnosticId string
|
||||
|
||||
phase2PermissionsMigrationComplete bool
|
||||
}
|
||||
|
||||
var appCount = 0
|
||||
@@ -588,3 +590,14 @@ func (a *App) DoAdvancedPermissionsMigration() {
|
||||
mlog.Critical(fmt.Sprint(result.Err))
|
||||
}
|
||||
}
|
||||
|
||||
func (a *App) SetPhase2PermissionsMigrationStatus(isComplete bool) error {
|
||||
if !isComplete {
|
||||
res := <-a.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
|
||||
if res.Err != nil {
|
||||
return res.Err
|
||||
}
|
||||
}
|
||||
a.phase2PermissionsMigrationComplete = isComplete
|
||||
return nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user