mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 00:40:25 +02:00
refactor to share more authorize check logic
should restore authorize log entries for ssh auth
This commit is contained in:
parent
3e6f4464af
commit
1da95d334c
7 changed files with 101 additions and 76 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue