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

Method AddGroupingPolicy

management_api.go:370–372  ·  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

368// If the rule already exists, the function returns false and the rule will not be added.
369// Otherwise the function returns true by adding the new rule.
370func (e *Enforcer) AddGroupingPolicy(params ...interface{}) (bool, error) {
371 return e.AddNamedGroupingPolicy("g", params...)
372}
373
374// AddGroupingPolicies adds role inheritance rules to the current policy.
375// If the rule already exists, the function returns false for the corresponding policy rule and the rule will not be added.

Calls 1