feat(aa): add support for prompt and priority rule.
This commit is contained in:
parent
3a17dd3310
commit
43f30333c6
3 changed files with 15 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue