Skip to content

Commit

Permalink
Merge 09b035c into 5453007
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-whit authored Feb 15, 2018
2 parents 5453007 + 09b035c commit 164bd52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions audit_logger_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ func (a *AuditLoggerInfo) LogRejectedAccessRequest(r *Request, p Policies, d Pol
if len(d) > 1 {
allowed := joinPoliciesNames(d[0 : len(d)-1])
denied := d[len(d)-1].GetID()
a.Logger.Printf("policies %s allow access, but policy %s forcefully denied it", allowed, denied)
a.logger().Printf("policies %s allow access, but policy %s forcefully denied it", allowed, denied)
} else if len(d) == 1 {
denied := d[len(d)-1].GetID()
a.Logger.Printf("policy %s forcefully denied the access", denied)
a.logger().Printf("policy %s forcefully denied the access", denied)
} else {
a.Logger.Printf("no policy allowed access")
a.logger().Printf("no policy allowed access")
}
}

func (a *AuditLoggerInfo) LogGrantedAccessRequest(r *Request, p Policies, d Policies) {
a.Logger.Printf("policies %s allow access", joinPoliciesNames(d))
a.logger().Printf("policies %s allow access", joinPoliciesNames(d))
}

func joinPoliciesNames(policies Policies) string {
Expand Down

0 comments on commit 164bd52

Please sign in to comment.