mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 13:16:28 +00:00
feat: object-list access (#1457)
Signed-off-by: loverustfs <github@rustfs.com> Co-authored-by: loverustfs <hello@rustfs.com> Co-authored-by: loverustfs <github@rustfs.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -817,11 +817,14 @@ impl S3Access for FS {
|
|||||||
authorize_request(req, Action::S3Action(S3Action::ListBucketMultipartUploadsAction)).await
|
authorize_request(req, Action::S3Action(S3Action::ListBucketMultipartUploadsAction)).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks whether the ListObjectVersions request has accesses to the resources.
|
/// Checks whether the `ListObjectVersions` request is authorized for the requested bucket.
|
||||||
///
|
///
|
||||||
/// This method returns `Ok(())` by default.
|
/// Returns `Ok(())` if the request is allowed, or an error if access is denied or another
|
||||||
async fn list_object_versions(&self, _req: &mut S3Request<ListObjectVersionsInput>) -> S3Result<()> {
|
/// authorization-related issue occurs.
|
||||||
Ok(())
|
async fn list_object_versions(&self, req: &mut S3Request<ListObjectVersionsInput>) -> S3Result<()> {
|
||||||
|
let req_info = req.extensions.get_mut::<ReqInfo>().expect("ReqInfo not found");
|
||||||
|
req_info.bucket = Some(req.input.bucket.clone());
|
||||||
|
authorize_request(req, Action::S3Action(S3Action::ListBucketVersionsAction)).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks whether the ListObjects request has accesses to the resources.
|
/// Checks whether the ListObjects request has accesses to the resources.
|
||||||
|
|||||||
Reference in New Issue
Block a user