From 9220254f05b6200de2e8ac78476a8df536c821ec Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 23 Feb 2017 03:53:33 -0500 Subject: Block OAuth account creation when disabled in config (#5506) --- model/gitlab/gitlab.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'model') 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 -- cgit v1.2.3-1-g7c22