Add max duration to msteams plugin cards#54110
Conversation
21098e6 to
341a4ef
Compare
| Resources []string | ||
| SuggestedReviewers []string | ||
| LoginsByRole map[string][]string | ||
| MaxDuration *time.Time |
There was a problem hiding this comment.
I'm confused by the type here. The name says "duration", but this is a "time" object. Should it be the access request end date, or a time.Duration?
There was a problem hiding this comment.
It is the the // GetMaxDuration gets the maximum time at which the access should be approved for. I think we just call it maxDuration since we take it in as a duration usually and convert it to the target time on request creation to avoid having to store the duration and the time the duration is from.
There was a problem hiding this comment.
My bad, I never realized that we made this mistake 2 years ago when introducing max duration 🤦 .
MaxDuration on a role is indeed a duration, but because naming is hard we also named it MaxDuration on the access request even though it's a timestamp.
There was a problem hiding this comment.
Although we did this error, can we at least rename this field to be LatestApprovalTime?
There was a problem hiding this comment.
Would changing the name only here make things clearer or would that just add to the existing confusion?
|
@bernardjkim @tigrato Could one of you take a look at this when you get a second? |
| Resources []string | ||
| SuggestedReviewers []string | ||
| LoginsByRole map[string][]string | ||
| MaxDuration *time.Time |
There was a problem hiding this comment.
Although we did this error, can we at least rename this field to be LatestApprovalTime?
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
|
@EdwardDowling See the table below for backport results.
|
Part of #43555
Adds max duration to the msteam plugin's cards
changelog: Include access request's max duration in MsTeams plugin messages