summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/gitlab
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/gitlab')
-rw-r--r--vendor/github.com/mattermost/platform/model/gitlab/gitlab.go13
1 files changed, 5 insertions, 8 deletions
diff --git a/vendor/github.com/mattermost/platform/model/gitlab/gitlab.go b/vendor/github.com/mattermost/platform/model/gitlab/gitlab.go
index 3ca49997..fc70dd93 100644
--- a/vendor/github.com/mattermost/platform/model/gitlab/gitlab.go
+++ b/vendor/github.com/mattermost/platform/model/gitlab/gitlab.go
@@ -12,10 +12,6 @@ import (
"strings"
)
-const (
- USER_AUTH_SERVICE_GITLAB = "gitlab"
-)
-
type GitLabProvider struct {
}
@@ -29,7 +25,7 @@ type GitLabUser struct {
func init() {
provider := &GitLabProvider{}
- einterfaces.RegisterOauthProvider(USER_AUTH_SERVICE_GITLAB, provider)
+ einterfaces.RegisterOauthProvider(model.USER_AUTH_SERVICE_GITLAB, provider)
}
func userFromGitLabUser(glu *GitLabUser) *model.User {
@@ -49,9 +45,10 @@ func userFromGitLabUser(glu *GitLabUser) *model.User {
} else {
user.FirstName = glu.Name
}
+ strings.TrimSpace(user.Email)
user.Email = glu.Email
- user.AuthData = strconv.FormatInt(glu.Id, 10)
- user.AuthService = USER_AUTH_SERVICE_GITLAB
+ *user.AuthData = strconv.FormatInt(glu.Id, 10)
+ user.AuthService = model.USER_AUTH_SERVICE_GITLAB
return user
}
@@ -84,7 +81,7 @@ func (glu *GitLabUser) getAuthData() string {
}
func (m *GitLabProvider) GetIdentifier() string {
- return USER_AUTH_SERVICE_GITLAB
+ return model.USER_AUTH_SERVICE_GITLAB
}
func (m *GitLabProvider) GetUserFromJson(data io.Reader) *model.User {