Returns new statements for given policy, bucket and prefix.
(policy BucketPolicy, bucketName, prefix string)
| 232 | |
| 233 | // Returns new statements for given policy, bucket and prefix. |
| 234 | func newStatements(policy BucketPolicy, bucketName, prefix string) (statements []Statement) { |
| 235 | statements = []Statement{} |
| 236 | ns := newBucketStatement(policy, bucketName, prefix) |
| 237 | statements = append(statements, ns...) |
| 238 | |
| 239 | ns = newObjectStatement(policy, bucketName, prefix) |
| 240 | statements = append(statements, ns...) |
| 241 | |
| 242 | return statements |
| 243 | } |
| 244 | |
| 245 | // Returns whether given bucket statements are used by other than given prefix statements. |
| 246 | func getInUsePolicy(statements []Statement, bucketName, prefix string) (readOnlyInUse, writeOnlyInUse bool) { |