Skip to content

Commit

Permalink
Merge pull request #793 from CareTogether/bugfix/backdated-exemptions…
Browse files Browse the repository at this point in the history
…-breaking

Fix for partial backdating of exemptions
  • Loading branch information
LarsKemmann authored Oct 29, 2024
2 parents b089097 + 2d24bee commit ffa8b49
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ internal static DateOnlyTimeline<RoleApprovalStatus>?
//TODO: Exemptions currently cannot be backdated, which may need to change in order to
// fully support handling policy exemptions correctly within the supersedence constraint.
// && (policyVersionSupersededAtUtc == null || exempted.TimestampUtc < policyVersionSupersededAtUtc))
//NOTE: Only include exemptions that are valid, i.e. that expired in the future at the time of exemption. Otherwise,
// the timeline logic will not work correctly. TODO: This will need to change once backdating is enabled.
.Where(exempted => exempted.ExemptionExpiresAtUtc == null ||
exempted.ExemptionExpiresAtUtc.Value >= exempted.TimestampUtc)
.Select(exempted => new DateRange(
//NOTE: This limits exemptions to being valid as of the time they were created.
// If we want to allow backdating or postdating exemptions, we'll need to change this.
Expand Down

0 comments on commit ffa8b49

Please sign in to comment.