From 4b3eaec70c530d705b52016c82fc445a255b872c Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Sat, 25 Apr 2015 02:19:28 +0300 Subject: [PATCH] Since 7.10 token life unlimited --- plugin/remote/gitlab/gitlab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/remote/gitlab/gitlab.go b/plugin/remote/gitlab/gitlab.go index 984eed6b9..69b50b34f 100644 --- a/plugin/remote/gitlab/gitlab.go +++ b/plugin/remote/gitlab/gitlab.go @@ -268,7 +268,7 @@ func (r *Gitlab) OpenRegistration() bool { func (r *Gitlab) GetToken(user *model.User) (*model.Token, error) { expiry := time.Unix(user.TokenExpiry, 0) - if expiry.Sub(time.Now()) > (60 * time.Second) { + if user.TokenExpiry == 0 || expiry.Sub(time.Now()) > (60*time.Second) { return nil, nil }