Этот коммит содержится в:
=Corey Hulen
2015-09-23 14:38:34 -07:00
родитель 1626a6de6f c7c644874e
Коммит 7f3bfdbe0c
83 изменённых файлов: 1672 добавлений и 492 удалений

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

@@ -58,7 +58,7 @@ type LogSettings struct {
FileLocation string
}
type ImageSettings struct {
type FileSettings struct {
DriverName string
Directory string
EnablePublicLink bool
@@ -123,7 +123,7 @@ type Config struct {
TeamSettings TeamSettings
SqlSettings SqlSettings
LogSettings LogSettings
ImageSettings ImageSettings
FileSettings FileSettings
EmailSettings EmailSettings
RateLimitSettings RateLimitSettings
PrivacySettings PrivacySettings

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

@@ -47,6 +47,7 @@ type User struct {
AllowMarketing bool `json:"allow_marketing"`
Props StringMap `json:"props"`
NotifyProps StringMap `json:"notify_props"`
ThemeProps StringMap `json:"theme_props"`
LastPasswordUpdate int64 `json:"last_password_update"`
LastPictureUpdate int64 `json:"last_picture_update"`
FailedAttempts int `json:"failed_attempts"`
@@ -108,6 +109,10 @@ func (u *User) IsValid() *AppError {
return NewAppError("User.IsValid", "Invalid user, password and auth data cannot both be set", "user_id="+u.Id)
}
if len(u.ThemeProps) > 2000 {
return NewAppError("User.IsValid", "Invalid theme", "user_id="+u.Id)
}
return nil
}