Skip to content

Instantly share code, notes, and snippets.

@anderseknert
Created February 4, 2020 11:52
Show Gist options
  • Save anderseknert/26d8d6bbebeb7dbeb1c853e2e243f053 to your computer and use it in GitHub Desktop.
Save anderseknert/26d8d6bbebeb7dbeb1c853e2e243f053 to your computer and use it in GitHub Desktop.
Incremental deny rule
deny[reason] {
input.role != "admin"
reason = "User not an admin"
}
deny[reason] {
time.weekday(time.now_ns()) == "Sunday"
reason = "Access not allowed on Sundays"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment