Example with multiple conditions missing
devdavidkarlsson opened this issue · 2 comments
devdavidkarlsson commented
https://github.com/ory/ladon/blob/9fada03c11c183e37c13f581ee6deca8d8e747f9/manager_test_helper.go
Looking at the manager I see the:
{
ID: uuid.New(),
Description: "description",
Subjects: []string{},
Effect: AllowAccess,
Resources: []string{"foo"},
Actions: []string{},
Conditions: Conditions{},
}
Should not the conditions be an array, for example: I may want to evaluate both the CIDR-address and string match on something.
tl;dr; Conditions is plural in the struct but is not a slice...
devdavidkarlsson commented
Ok thanks, my misstake.
{
ID: uuid.New(),
Description: "description",
Subjects: []string{"<.*>"},
Effect: AllowAccess,
Resources: []string{"<article|user>"},
Actions: []string{"view"},
Conditions: Conditions{
"ip": &CIDRCondition{
CIDR: "1234",
},
"owner": &EqualsSubjectCondition{},
},
}