feat(aa): add support for prompt and priority rule.

This commit is contained in:
Alexandre Pujol 2025-08-24 23:14:52 +02:00
parent 3a17dd3310
commit 43f30333c6
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
3 changed files with 15 additions and 2 deletions

View file

@ -15,6 +15,8 @@ const (
tokALLOW = "allow"
tokAUDIT = "audit"
tokDENY = "deny"
tokPROMPT = "prompt"
tokPRIORITY = "priority"
tokARROW = "->"
tokEQUAL = "="
tokLESS = "<"
@ -524,7 +526,11 @@ func newRules(rules []rule) (Rules, error) {
rule = rule[1:]
goto qualifier
// Qualifier
case tokALLOW, tokDENY:
case tokPRIORITY:
q.Priority = rule.GetValues(tokPRIORITY).GetString()
rule = rule[1:]
goto qualifier
case tokALLOW, tokDENY, tokPROMPT:
q.AccessType = rule.Get(0)
rule = rule[1:]
goto qualifier