Skip to content

Commit f7a7622

Browse files
committed
cedar-go: use the PolicySet.All() iterator to implement PolicySet.IsAuthorized()
Signed-off-by: Patrick Jakubowski <patrick.jakubowski@strongdm.com>
1 parent adc25f6 commit f7a7622

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

policy_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (p *PolicySet) UnmarshalJSON(b []byte) error {
134134
//
135135
// Deprecated: Use the Authorize() function instead
136136
func (p PolicySet) IsAuthorized(entities types.EntityGetter, req Request) (Decision, Diagnostic) {
137-
return Authorize(maps.All(p.policies), entities, req)
137+
return Authorize(p.All(), entities, req)
138138
}
139139

140140
// All returns an iterator over the (PolicyID, *Policy) tuples in the PolicySet

0 commit comments

Comments
 (0)