Skip to content

Commit

Permalink
Merge pull request harness#992 from Bugagazavr/gitlab-zero-expiry
Browse files Browse the repository at this point in the history
Since 7.10 token life unlimited
  • Loading branch information
bradrydzewski committed Apr 24, 2015
2 parents af9c1e9 + 4b3eaec commit c475195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/remote/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit c475195

Please sign in to comment.