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

Method AddPolicy

transaction.go:50–52  ·  view source on GitHub ↗

AddPolicy adds a policy within the transaction. The policy is buffered and will be applied when the transaction is committed.

(params ...interface{})

Source from the content-addressed store, hash-verified

48// AddPolicy adds a policy within the transaction.
49// The policy is buffered and will be applied when the transaction is committed.
50func (tx *Transaction) AddPolicy(params ...interface{}) (bool, error) {
51 return tx.AddNamedPolicy("p", params...)
52}
53
54// buildRuleFromParams converts parameters to a rule slice.
55func (tx *Transaction) buildRuleFromParams(params ...interface{}) []string {

Callers

nothing calls this directly

Calls 1

AddNamedPolicyMethod · 0.95

Tested by

no test coverage detected