MCPcopy Create free account
hub / github.com/apache/casbin / AddGroupingPolicy

Method AddGroupingPolicy

enforcer_synced.go:516–520  ·  view source on GitHub ↗

AddGroupingPolicy adds a role inheritance rule to the current policy. If the rule already exists, the function returns false and the rule will not be added. Otherwise the function returns true by adding the new rule.

(params ...interface{})

Source from the content-addressed store, hash-verified

514// If the rule already exists, the function returns false and the rule will not be added.
515// Otherwise the function returns true by adding the new rule.
516func (e *SyncedEnforcer) AddGroupingPolicy(params ...interface{}) (bool, error) {
517 e.m.Lock()
518 defer e.m.Unlock()
519 return e.Enforcer.AddGroupingPolicy(params...)
520}
521
522// AddGroupingPolicies adds role inheritance rulea to the current policy.
523// If the rule already exists, the function returns false for the corresponding policy rule and the rule will not be added.

Callers

nothing calls this directly

Calls 1

AddGroupingPolicyMethod · 0.65

Tested by

no test coverage detected