mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
fix: policy-action-1903 (#1927)
Co-authored-by: 安正超 <anzhengchao@gmail.com>
This commit is contained in:
@@ -865,7 +865,7 @@ impl S3Access for FS {
|
|||||||
let req_info = req.extensions.get_mut::<ReqInfo>().expect("ReqInfo not found");
|
let req_info = req.extensions.get_mut::<ReqInfo>().expect("ReqInfo not found");
|
||||||
req_info.bucket = Some(req.input.bucket.clone());
|
req_info.bucket = Some(req.input.bucket.clone());
|
||||||
|
|
||||||
authorize_request(req, Action::S3Action(S3Action::GetObjectAclAction)).await
|
authorize_request(req, Action::S3Action(S3Action::GetBucketPolicyAction)).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks whether the GetBucketPolicyStatus request has accesses to the resources.
|
/// Checks whether the GetBucketPolicyStatus request has accesses to the resources.
|
||||||
@@ -943,7 +943,7 @@ impl S3Access for FS {
|
|||||||
req_info.object = Some(req.input.key.clone());
|
req_info.object = Some(req.input.key.clone());
|
||||||
req_info.version_id = req.input.version_id.clone();
|
req_info.version_id = req.input.version_id.clone();
|
||||||
|
|
||||||
authorize_request(req, Action::S3Action(S3Action::GetBucketPolicyAction)).await
|
authorize_request(req, Action::S3Action(S3Action::GetObjectAclAction)).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks whether the GetObjectAttributes request has accesses to the resources.
|
/// Checks whether the GetObjectAttributes request has accesses to the resources.
|
||||||
@@ -1270,7 +1270,7 @@ impl S3Access for FS {
|
|||||||
let req_info = req.extensions.get_mut::<ReqInfo>().expect("ReqInfo not found");
|
let req_info = req.extensions.get_mut::<ReqInfo>().expect("ReqInfo not found");
|
||||||
req_info.bucket = Some(req.input.bucket.clone());
|
req_info.bucket = Some(req.input.bucket.clone());
|
||||||
|
|
||||||
authorize_request(req, Action::S3Action(S3Action::PutObjectAclAction)).await
|
authorize_request(req, Action::S3Action(S3Action::PutBucketPolicyAction)).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks whether the PutBucketReplication request has accesses to the resources.
|
/// Checks whether the PutBucketReplication request has accesses to the resources.
|
||||||
@@ -1340,7 +1340,7 @@ impl S3Access for FS {
|
|||||||
req_info.object = Some(req.input.key.clone());
|
req_info.object = Some(req.input.key.clone());
|
||||||
req_info.version_id = req.input.version_id.clone();
|
req_info.version_id = req.input.version_id.clone();
|
||||||
|
|
||||||
authorize_request(req, Action::S3Action(S3Action::PutBucketPolicyAction)).await
|
authorize_request(req, Action::S3Action(S3Action::PutObjectAclAction)).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks whether the PutObjectLegalHold request has accesses to the resources.
|
/// Checks whether the PutObjectLegalHold request has accesses to the resources.
|
||||||
|
|||||||
Reference in New Issue
Block a user