Fix bad condition on hiding email addresses and update user etag to include privacy settings (#3327)

Этот коммит содержится в:
Joram Wilander
2016-06-14 12:12:46 -04:00
коммит произвёл GitHub
родитель a0cc913b85
Коммит 8f87e60231
10 изменённых файлов: 17 добавлений и 33 удалений

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

@@ -244,8 +244,8 @@ func (u *User) ToJson() string {
}
// Generate a valid strong etag so the browser can cache the results
func (u *User) Etag() string {
return Etag(u.Id, u.UpdateAt)
func (u *User) Etag(showFullName, showEmail bool) string {
return Etag(u.Id, u.UpdateAt, showFullName, showEmail)
}
func (u *User) IsOffline() bool {

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

@@ -33,7 +33,7 @@ func TestUserJson(t *testing.T) {
func TestUserPreSave(t *testing.T) {
user := User{Password: "test"}
user.PreSave()
user.Etag()
user.Etag(true, true)
}
func TestUserPreUpdate(t *testing.T) {