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

Function NewConditionalRoleManager

rbac/default-role-manager/role_manager.go:773–778  ·  view source on GitHub ↗

NewConditionalRoleManager is the constructor for creating an instance of the ConditionalRoleManager implementation.

(maxHierarchyLevel int)

Source from the content-addressed store, hash-verified

771// NewConditionalRoleManager is the constructor for creating an instance of the
772// ConditionalRoleManager implementation.
773func NewConditionalRoleManager(maxHierarchyLevel int) *ConditionalRoleManager {
774 rm := ConditionalRoleManager{}
775 _ = rm.Clear() // init allRoles and matchingFuncCache
776 rm.maxHierarchyLevel = maxHierarchyLevel
777 return &rm
778}
779
780// HasLink determines whether role: name1 inherits role: name2.
781func (crm *ConditionalRoleManager) HasLink(name1 string, name2 string, domains ...string) (bool, error) {

Calls 1

ClearMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…