File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/server/system_services Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1057,8 +1057,13 @@ async function list_buckets(req) {
10571057 let continuation_token = req . rpc_params ?. continuation_token ;
10581058 const max_buckets = req . rpc_params ?. max_buckets ;
10591059
1060- const accessible_bucket_list = system_store . data . buckets . filter (
1061- async bucket => await req . has_s3_bucket_permission ( bucket , "s3:ListBucket" , req ) && ! bucket . deleting
1060+ const accessible_bucket_list = [ ] ;
1061+ await Promise . all (
1062+ system_store . data . buckets . map ( async bucket => {
1063+ if ( bucket . deleting ) return ;
1064+ const has_permission = await req . has_s3_bucket_permission ( bucket , "s3:ListBucket" , req ) ;
1065+ if ( has_permission ) accessible_bucket_list . push ( bucket ) ;
1066+ } )
10621067 ) ;
10631068
10641069 accessible_bucket_list . sort ( ( a , b ) => a . name . unwrap ( ) . localeCompare ( b . name . unwrap ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments