deepCopyPolicy returns a deepcopy version of the policy to prevent changing policies through returned slice.
(src []string)
| 466 | |
| 467 | // deepCopyPolicy returns a deepcopy version of the policy to prevent changing policies through returned slice. |
| 468 | func 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.") |
no outgoing calls
no test coverage detected
searching dependent graphs…