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

Method SelfAddPolicyCtx

enforcer_context.go:374–376  ·  view source on GitHub ↗

Self Context Methods (bypass watcher notifications) SelfAddPolicyCtx adds a policy rule to the current policy with context.

(ctx context.Context, sec string, ptype string, rule []string)

Source from the content-addressed store, hash-verified

372
373// SelfAddPolicyCtx adds a policy rule to the current policy with context.
374func (e *ContextEnforcer) SelfAddPolicyCtx(ctx context.Context, sec string, ptype string, rule []string) (bool, error) {
375 return e.addPolicyWithoutNotifyCtx(ctx, sec, ptype, rule)
376}
377
378// SelfAddPoliciesCtx adds policy rules to the current policy with context.
379func (e *ContextEnforcer) SelfAddPoliciesCtx(ctx context.Context, sec string, ptype string, rules [][]string) (bool, error) {

Callers 1

Calls 1

Tested by 1