Address review feedback by @jefferai

This commit is contained in:
vishalnayak 2016-08-09 17:45:42 -04:00
parent 8d261b1a78
commit b150c14caa

View file

@ -291,7 +291,7 @@ func (b *backend) pathRoleCreateUpdate(
roleEntry.MaxTTL = time.Duration(data.Get("max_ttl").(int)) * time.Second
}
if roleEntry.MaxTTL < roleEntry.TTL {
if roleEntry.MaxTTL != 0 && roleEntry.MaxTTL < roleEntry.TTL {
return logical.ErrorResponse("ttl should be shorter than max_ttl"), nil
}