Adding migration support to LDAP from other account types (#3655)

Этот коммит содержится в:
Christopher Speller
2016-07-26 17:39:51 -04:00
коммит произвёл Joram Wilander
родитель 528890dba0
Коммит f5375254f9
8 изменённых файлов: 154 добавлений и 6 удалений

20
einterfaces/account_migration.go Обычный файл
Просмотреть файл

@@ -0,0 +1,20 @@
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package einterfaces
import "github.com/mattermost/platform/model"
type AccountMigrationInterface interface {
MigrateToLdap(fromAuthService string, forignUserFieldNameToMatch string) *model.AppError
}
var theAccountMigrationInterface AccountMigrationInterface
func RegisterAccountMigrationInterface(newInterface AccountMigrationInterface) {
theAccountMigrationInterface = newInterface
}
func GetAccountMigrationInterface() AccountMigrationInterface {
return theAccountMigrationInterface
}

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

@@ -15,6 +15,8 @@ type LdapInterface interface {
ValidateFilter(filter string) *model.AppError
Syncronize() *model.AppError
StartLdapSyncJob()
SyncNow()
GetAllLdapUsers() ([]*model.User, *model.AppError)
}
var theLdapInterface LdapInterface