summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--api/user.go1
-rw-r--r--model/post.go1
-rw-r--r--model/user.go54
-rw-r--r--store/sql_post_store.go1
-rw-r--r--web/react/components/tutorial/tutorial_intro_screens.jsx12
-rw-r--r--web/sass-files/sass/partials/_tutorial.scss7
7 files changed, 54 insertions, 24 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 142e15d91..a21f118b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -108,7 +108,7 @@ The following is for informational purposes only, no action needed. Mattermost a
- Editing a post so that it's text is blank (which should delete it) throws a 404
- No scroll bar in centre channel
- Theme color import from Slack fails to import the “Active Channel” selection color
-- Pasting images into text box fails to upload on [BROWSERS]
+- Pasting images into text box fails to upload on Firefox and Safari
- Users cannot claim accounts imported from Slack via password reset
- Slack import @mentions break
diff --git a/api/user.go b/api/user.go
index 4a52cf88b..0f868a678 100644
--- a/api/user.go
+++ b/api/user.go
@@ -669,6 +669,7 @@ func getProfiles(c *Context, w http.ResponseWriter, r *http.Request) {
}
p.Sanitize(options)
+ p.ClearNonProfileFields()
profiles[k] = p
}
diff --git a/model/post.go b/model/post.go
index 248d40321..5578514b5 100644
--- a/model/post.go
+++ b/model/post.go
@@ -26,7 +26,6 @@ type Post struct {
ParentId string `json:"parent_id"`
OriginalId string `json:"original_id"`
Message string `json:"message"`
- ImgCount int64 `json:"img_count"`
Type string `json:"type"`
Props StringInterface `json:"props"`
Hashtags string `json:"hashtags"`
diff --git a/model/user.go b/model/user.go
index 4365f47d2..0ce8e1733 100644
--- a/model/user.go
+++ b/model/user.go
@@ -28,29 +28,29 @@ const (
type User struct {
Id string `json:"id"`
- CreateAt int64 `json:"create_at"`
- UpdateAt int64 `json:"update_at"`
+ CreateAt int64 `json:"create_at,omitempty"`
+ UpdateAt int64 `json:"update_at,omitempty"`
DeleteAt int64 `json:"delete_at"`
TeamId string `json:"team_id"`
Username string `json:"username"`
- Password string `json:"password"`
- AuthData string `json:"auth_data"`
- AuthService string `json:"auth_service"`
+ Password string `json:"password,omitempty"`
+ AuthData string `json:"auth_data,omitempty"`
+ AuthService string `json:"auth_service,omitempty"`
Email string `json:"email"`
- EmailVerified bool `json:"email_verified"`
+ EmailVerified bool `json:"email_verified,omitempty"`
Nickname string `json:"nickname"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Roles string `json:"roles"`
- LastActivityAt int64 `json:"last_activity_at"`
- LastPingAt int64 `json:"last_ping_at"`
- 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"`
+ LastActivityAt int64 `json:"last_activity_at,omitempty"`
+ LastPingAt int64 `json:"last_ping_at,omitempty"`
+ AllowMarketing bool `json:"allow_marketing,omitempty"`
+ Props StringMap `json:"props,omitempty"`
+ NotifyProps StringMap `json:"notify_props,omitempty"`
+ ThemeProps StringMap `json:"theme_props,omitempty"`
+ LastPasswordUpdate int64 `json:"last_password_update,omitempty"`
+ LastPictureUpdate int64 `json:"last_picture_update,omitempty"`
+ FailedAttempts int `json:"failed_attempts,omitempty"`
}
// IsValid validates the user and returns an error if it isn't configured
@@ -221,17 +221,29 @@ func (u *User) Sanitize(options map[string]bool) {
u.FirstName = ""
u.LastName = ""
}
- if len(options) != 0 && !options["skypeid"] {
- // TODO - fill in when SkypeId is added to user model
- }
- if len(options) != 0 && !options["phonenumber"] {
- // TODO - fill in when PhoneNumber is added to user model
- }
if len(options) != 0 && !options["passwordupdate"] {
u.LastPasswordUpdate = 0
}
}
+func (u *User) ClearNonProfileFields() {
+ u.CreateAt = 0
+ u.UpdateAt = 0
+ u.Password = ""
+ u.AuthData = ""
+ u.AuthService = ""
+ u.EmailVerified = false
+ u.LastActivityAt = 0
+ u.LastPingAt = 0
+ u.AllowMarketing = false
+ u.Props = StringMap{}
+ u.NotifyProps = StringMap{}
+ u.ThemeProps = StringMap{}
+ u.LastPasswordUpdate = 0
+ u.LastPictureUpdate = 0
+ u.FailedAttempts = 0
+}
+
func (u *User) MakeNonNil() {
if u.Props == nil {
u.Props = make(map[string]string)
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 3a25fe89b..f800367cb 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -38,6 +38,7 @@ func NewSqlPostStore(sqlStore *SqlStore) PostStore {
}
func (s SqlPostStore) UpgradeSchemaIfNeeded() {
+ s.RemoveColumnIfExists("Posts", "ImgCount") // remove after 1.3 release
}
func (s SqlPostStore) CreateIndexesIfNotExists() {
diff --git a/web/react/components/tutorial/tutorial_intro_screens.jsx b/web/react/components/tutorial/tutorial_intro_screens.jsx
index 66ca556c6..3afc5145d 100644
--- a/web/react/components/tutorial/tutorial_intro_screens.jsx
+++ b/web/react/components/tutorial/tutorial_intro_screens.jsx
@@ -41,6 +41,11 @@ export default class TutorialIntroScreens extends React.Component {
componentDidMount() {
$('.tutorials__scroll').perfectScrollbar();
}
+ skipTutorial(e) {
+ e.preventDefault();
+ const preference = PreferenceStore.setPreference(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), '999');
+ AsyncClient.savePreferences([preference]);
+ }
createScreen() {
switch (this.state.currentScreen) {
case 0:
@@ -176,6 +181,13 @@ export default class TutorialIntroScreens extends React.Component {
>
{'Next'}
</button>
+ <a
+ className='tutorial-skip'
+ href='#'
+ onClick={this.skipTutorial}
+ >
+ {'Skip tutorial'}
+ </a>
</div>
</div>
</div>
diff --git a/web/sass-files/sass/partials/_tutorial.scss b/web/sass-files/sass/partials/_tutorial.scss
index a6e16fe37..cfbc3454a 100644
--- a/web/sass-files/sass/partials/_tutorial.scss
+++ b/web/sass-files/sass/partials/_tutorial.scss
@@ -162,7 +162,7 @@
}
.btn-primary {
position: absolute;
- bottom: 0;
+ bottom: 0px;
}
}
h1 {
@@ -179,6 +179,11 @@
position: absolute;
bottom: 40px;
}
+ .tutorial-skip {
+ position: absolute;
+ bottom: 7px;
+ left: 80px;
+ }
}
.tutorial__circles {