MCPcopy Index your code
hub / github.com/apache/casbin / AddPolicyCtx

Method AddPolicyCtx

enforcer_context.go:162–164  ·  view source on GitHub ↗

AddPolicyCtx adds a policy rule to the storage with context.

(ctx context.Context, params ...interface{})

Source from the content-addressed store, hash-verified

160
161// AddPolicyCtx adds a policy rule to the storage with context.
162func (e *ContextEnforcer) AddPolicyCtx(ctx context.Context, params ...interface{}) (bool, error) {
163 return e.AddNamedPolicyCtx(ctx, "p", params...)
164}
165
166// AddPoliciesCtx adds policy rules to the storage with context.
167func (e *ContextEnforcer) AddPoliciesCtx(ctx context.Context, rules [][]string) (bool, error) {

Calls 1

AddNamedPolicyCtxMethod · 0.95