Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
add display rule for signature renewal banner
Browse files Browse the repository at this point in the history
  • Loading branch information
gstoehld committed Jun 7, 2022
1 parent 61be2e8 commit b8aff48
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
Check whether the cert signature is about to expire
*/

import "../rule-constants/vaccine.aifc";
import "../rule-constants/test.aifc";
import "../rule-constants/recovery.aifc";

let cutoff = now() + 90#days;

if (payload.h.exp) {
if((payload.h.exp as DateTime) is before (cutoff as DateTime)){
"showRenewBanner"
} else {
undefined
}
} else {
undefined
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"if": [
{
"var": "payload.h.exp"
},
{
"if": [
{
"before": [
{
"var": "payload.h.exp"
},
{
"plusTime": [
{
"var": "external.validationClock"
},
90,
"day"
]
}
]
},
"showRenewBanner",
{
"var": "undefined"
}
]
},
{
"var": "undefined"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,80 @@
]
}
},
{
"id": "refresh-banner",
"logic": {
"if": [
{
"var": "payload.h.exp"
},
{
"if": [
{
"before": [
{
"var": "payload.h.exp"
},
{
"plusTime": [
{
"var": "external.validationClock"
},
90,
"day"
]
}
]
},
"showRefreshBanner",
{
"var": "undefined"
}
]
},
{
"var": "undefined"
}
]
}
},
{
"id": "renew-banner",
"logic": {
"if": [
{
"var": "payload.h.exp"
},
{
"if": [
{
"before": [
{
"var": "payload.h.exp"
},
{
"plusTime": [
{
"var": "external.validationClock"
},
90,
"day"
]
}
]
},
"showRenewBanner",
{
"var": "undefined"
}
]
},
{
"var": "undefined"
}
]
}
},
{
"id": "eol-banner",
"logic": {
Expand Down

0 comments on commit b8aff48

Please sign in to comment.