MCPcopy
hub / github.com/minio/minio-go / removeObjectActions

Function removeObjectActions

pkg/policy/bucket-policy.go:269–280  ·  view source on GitHub ↗

Removes object actions in given statement.

(statement Statement, objectResource string)

Source from the content-addressed store, hash-verified

267
268// Removes object actions in given statement.
269func removeObjectActions(statement Statement, objectResource string) Statement {
270 if statement.Conditions == nil {
271 if len(statement.Resources) > 1 {
272 statement.Resources.Remove(objectResource)
273 } else {
274 statement.Actions = statement.Actions.Difference(readOnlyObjectActions)
275 statement.Actions = statement.Actions.Difference(writeOnlyObjectActions)
276 }
277 }
278
279 return statement
280}
281
282// Removes bucket actions for given policy in given statement.
283func removeBucketActions(statement Statement, prefix, bucketResource string, readOnlyInUse, writeOnlyInUse bool) Statement {

Callers 1

removeStatementsFunction · 0.85

Calls 2

RemoveMethod · 0.45
DifferenceMethod · 0.45

Tested by

no test coverage detected