mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 08:06:52 +02:00
Since 7.10 token life unlimited
This commit is contained in:
parent
af9c1e9bd7
commit
4b3eaec70c
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user