Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for subjectMatches (0.3 sec)

  1. pkg/auth/authorizer/abac/abac.go

    	if subjectMatches(p, a.GetUser()) {
    		if verbMatches(p, a) {
    			// Resource and non-resource requests are mutually exclusive, at most one will match a policy
    			if resourceMatches(p, a) {
    				return true
    			}
    			if nonResourceMatches(p, a) {
    				return true
    			}
    		}
    	}
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 11 03:11:30 UTC 2021
    - 7.4K bytes
    - Viewed (0)
  2. pkg/auth/authorizer/abac/abac_test.go

    			t.Errorf("%s: error converting: %v", k, err)
    			continue
    		}
    		attr := authorizer.AttributesRecord{
    			User: &tc.User,
    		}
    		actualMatch := subjectMatches(*policy, attr.GetUser())
    		if tc.ExpectMatch != actualMatch {
    			t.Errorf("%v: Expected actorMatches=%v but actually got=%v",
    				k, tc.ExpectMatch, actualMatch)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 24 15:14:54 UTC 2019
    - 40K bytes
    - Viewed (0)
Back to top