Changes signature of FirstLoginSync function. (#10211)

* First login fix (2).

* Adds cautionary note about 'sanitized' fields.
Этот коммит содержится в:
Martin Kraft
2019-02-01 17:37:11 -05:00
коммит произвёл Carlos Tadeu Panato Junior
родитель 145fa9a57b
Коммит 9a3dc21adc
2 изменённых файлов: 3 добавлений и 1 удалений

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

@@ -183,6 +183,8 @@ func (a *App) IsFirstUserAccount() bool {
return false
}
// CreateUser creates a user and sets several fields of the returned User struct to
// their zero values.
func (a *App) CreateUser(user *model.User) (*model.User, *model.AppError) {
if !user.IsLDAPUser() && !user.IsSAMLUser() && !CheckUserDomain(user, *a.Config().TeamSettings.RestrictCreationToDomains) {
return nil, model.NewAppError("CreateUser", "api.user.create_user.accepted_domain.app_error", nil, "", http.StatusBadRequest)

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

@@ -21,5 +21,5 @@ type LdapInterface interface {
MigrateIDAttribute(toAttribute string) error
GetGroup(groupUID string) (*model.Group, *model.AppError)
GetAllGroupsPage(page int, perPage int) ([]*model.Group, int, *model.AppError)
FirstLoginSync(user *model.User) *model.AppError
FirstLoginSync(userID, userAuthService, userAuthData string) *model.AppError
}