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

Function deepCopyPolicy

rbac_api.go:468–472  ·  view source on GitHub ↗

deepCopyPolicy returns a deepcopy version of the policy to prevent changing policies through returned slice.

(src []string)

Source from the content-addressed store, hash-verified

466
467// deepCopyPolicy returns a deepcopy version of the policy to prevent changing policies through returned slice.
468func deepCopyPolicy(src []string) []string {
469 newRule := make([]string, len(src))
470 copy(newRule, src)
471 return newRule
472}
473
474// GetAllowedObjectConditions returns a string array of object conditions that the user can access.
475// For example: conditions, err := e.GetAllowedObjectConditions("alice", "read", "r.obj.")

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…