mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Enhance policy handling to support SSE and WORM (#5790)
- remove old bucket policy handling - add new policy handling - add new policy handling unit tests This patch brings support to bucket policy to have more control not limiting to anonymous. Bucket owner controls to allow/deny any rest API. For example server side encryption can be controlled by allowing PUT/GET objects with encryptions including bucket owner.
This commit is contained in:
@@ -366,13 +366,6 @@ func (e PolicyNesting) Error() string {
|
||||
return "New bucket policy conflicts with an existing policy. Please try again with new prefix."
|
||||
}
|
||||
|
||||
// PolicyNotFound - policy not found
|
||||
type PolicyNotFound GenericError
|
||||
|
||||
func (e PolicyNotFound) Error() string {
|
||||
return "Policy not found"
|
||||
}
|
||||
|
||||
// UnsupportedMetadata - unsupported metadata
|
||||
type UnsupportedMetadata struct{}
|
||||
|
||||
@@ -396,15 +389,6 @@ func isErrIncompleteBody(err error) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// isErrBucketPolicyNotFound - Check if error type is BucketPolicyNotFound.
|
||||
func isErrBucketPolicyNotFound(err error) bool {
|
||||
switch err.(type) {
|
||||
case PolicyNotFound:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// isErrObjectNotFound - Check if error type is ObjectNotFound.
|
||||
func isErrObjectNotFound(err error) bool {
|
||||
switch err.(type) {
|
||||
|
||||
Reference in New Issue
Block a user