diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-23 03:53:33 -0500 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-02-23 08:53:33 +0000 |
commit | 9220254f05b6200de2e8ac78476a8df536c821ec (patch) | |
tree | 9fc67b94e25e65ebe85ddef1b0b5a4df6fe263dc /model/gitlab/gitlab.go | |
parent | 7883a515e72690e08e10d38fafc741da1e7a0deb (diff) | |
download | chat-9220254f05b6200de2e8ac78476a8df536c821ec.tar.gz chat-9220254f05b6200de2e8ac78476a8df536c821ec.tar.bz2 chat-9220254f05b6200de2e8ac78476a8df536c821ec.zip |
Block OAuth account creation when disabled in config (#5506)
Diffstat (limited to 'model/gitlab/gitlab.go')
-rw-r--r-- | model/gitlab/gitlab.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/model/gitlab/gitlab.go b/model/gitlab/gitlab.go index e189ee68d..270d62d8b 100644 --- a/model/gitlab/gitlab.go +++ b/model/gitlab/gitlab.go @@ -65,6 +65,15 @@ func gitLabUserFromJson(data io.Reader) *GitLabUser { } } +func (glu *GitLabUser) ToJson() string { + b, err := json.Marshal(glu) + if err != nil { + return "" + } else { + return string(b) + } +} + func (glu *GitLabUser) IsValid() bool { if glu.Id == 0 { return false |