MCPcopy
hub / github.com/apache/casbin / AddMatchingFunc

Method AddMatchingFunc

rbac/role_manager.go:57–57  ·  view source on GitHub ↗

AddMatchingFunc adds the matching function

(name string, fn MatchingFunc)

Source from the content-addressed store, hash-verified

55 Match(str string, pattern string) bool
56 // AddMatchingFunc adds the matching function
57 AddMatchingFunc(name string, fn MatchingFunc)
58 // AddDomainMatchingFunc adds the domain matching function
59 AddDomainMatchingFunc(name string, fn MatchingFunc)
60 // DeleteDomain deletes all data of a domain in the role manager.

Callers 8

TestRoleFunction · 0.95
TestAllMatchingFuncFunction · 0.95
TestMatchingFuncOrderFunction · 0.95
TestTemporaryRolesFunction · 0.95
TestConcurrentHasLinkFunction · 0.95
TestImplicitRoleAPIFunction · 0.65
AddNamedMatchingFuncMethod · 0.65
AddMatchingFuncMethod · 0.65

Implementers 3

RoleManagerImplrbac/default-role-manager/role_manager
DomainManagerrbac/default-role-manager/role_manager

Calls

no outgoing calls

Tested by 6

TestRoleFunction · 0.76
TestAllMatchingFuncFunction · 0.76
TestMatchingFuncOrderFunction · 0.76
TestTemporaryRolesFunction · 0.76
TestConcurrentHasLinkFunction · 0.76
TestImplicitRoleAPIFunction · 0.52