Skip to content

Commit

Permalink
keep in logic for backwards compatability in common fate timings
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerjrr committed Aug 2, 2024
1 parent c6f4085 commit 7ab8ff7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/hook/accessrequesthook/accessrequesthook.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ func DryRun(ctx context.Context, apiURL *url.URL, client accessv1alpha1connect.A
if res.Msg.DurationConfiguration.DefaultDuration != nil {
exp = ShortDur(res.Msg.DurationConfiguration.DefaultDuration.AsDuration())
}
} else {
//attempt to work out duration from expiry to preserve backyards compatability
exp = ShortDur(time.Until(g.Grant.ExpiresAt.AsTime()))
}

if g.Change > 0 {
Expand Down

0 comments on commit 7ab8ff7

Please sign in to comment.