Removes object actions in given statement.
(statement Statement, objectResource string)
| 267 | |
| 268 | // Removes object actions in given statement. |
| 269 | func 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. |
| 283 | func removeBucketActions(statement Statement, prefix, bucketResource string, readOnlyInUse, writeOnlyInUse bool) Statement { |
no test coverage detected