Skip to content

Commit

Permalink
fix: resolve test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed May 28, 2020
1 parent 5f7030c commit 9bd9956
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion engine/ladon/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,17 @@ func toSwaggerPolicy(p kstorage.Policy) *models.OryAccessControlPolicy {
}

func fromSwaggerPolicy(p models.OryAccessControlPolicy) kstorage.Policy {
conditions, ok := p.Conditions.(map[string]interface{})
if !ok {
conditions = nil
}
return kstorage.Policy{
Actions: p.Actions,
ID: p.ID,
Resources: p.Resources,
Subjects: p.Subjects,
Effect: p.Effect,
Conditions: p.Conditions,
Conditions: conditions,
Description: p.Description,
}
}
Expand Down

0 comments on commit 9bd9956

Please sign in to comment.