refactor to share more authorize check logic

should restore authorize log entries for ssh auth
This commit is contained in:
Kenneth Jenkins 2025-02-27 13:04:44 -08:00
parent 3e6f4464af
commit 1da95d334c
7 changed files with 101 additions and 76 deletions

View file

@ -31,6 +31,10 @@ type PolicyResponse struct {
Traces []contextutil.PolicyEvaluationTrace
}
func (r *PolicyResponse) Allowed() bool {
return r.Allow.Value && !r.Deny.Value
}
// NewPolicyResponse creates a new PolicyResponse.
func NewPolicyResponse() *PolicyResponse {
return &PolicyResponse{