@@ -166,11 +166,11 @@ func TestActionRegistry_ByService(t *testing.T) {
|
||||
|
||||
func TestParseAction(t *testing.T) {
|
||||
tests := []struct {
|
||||
action Action
|
||||
wantSvc string
|
||||
wantRes string
|
||||
wantOp string
|
||||
wantErr bool
|
||||
action Action
|
||||
wantSvc string
|
||||
wantRes string
|
||||
wantOp string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
action: "iam:identity:get",
|
||||
@@ -217,4 +217,3 @@ func TestParseAction(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -203,9 +203,9 @@ func TestEvaluator_Evaluate_MultipleConditions(t *testing.T) {
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
ctx ConditionContext
|
||||
want Decision
|
||||
name string
|
||||
ctx ConditionContext
|
||||
want Decision
|
||||
}{
|
||||
{
|
||||
name: "both conditions satisfied",
|
||||
@@ -260,10 +260,10 @@ func TestEvaluator_Evaluate_WildcardActions(t *testing.T) {
|
||||
evaluator := NewEvaluator()
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
policy *Policy
|
||||
action string
|
||||
want Decision
|
||||
name string
|
||||
policy *Policy
|
||||
action string
|
||||
want Decision
|
||||
}{
|
||||
{
|
||||
name: "full wildcard allows everything",
|
||||
@@ -443,4 +443,3 @@ func TestEvaluationResult_IsAllowed(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -204,4 +204,3 @@ func Example_conditionBasedAccess() {
|
||||
// User update own profile: allow
|
||||
// User update other profile: no_match
|
||||
}
|
||||
|
||||
|
||||
@@ -86,4 +86,3 @@ func (m *ActionMatcher) MatchesAny(patterns []string, target string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user