@@ -28,6 +28,7 @@ const controller = {
2828 const versionIds = mixedQueryToArray ( req . query . versionId ) ;
2929 const s3VersionIds = mixedQueryToArray ( req . query . s3VersionId ) ;
3030 const metadata = getMetadata ( req . headers ) ;
31+ const bucketId = mixedQueryToArray ( req . query . bucketId ) ;
3132
3233 const params = {
3334 versionIds : versionIds ? versionIds . map ( id => addDashesToUuid ( id ) ) : versionIds ,
@@ -37,6 +38,7 @@ const controller = {
3738 // if scoping to current user permissions on objects
3839 if ( getConfigBoolean ( 'server.privacyMask' ) ) {
3940 params . userId = await userService . getCurrentUserId ( getCurrentIdentity ( req . currentUser , SYSTEM_USER ) ) ;
41+ params . bucketId = bucketId ?. length ? bucketId : undefined ;
4042 }
4143 const response = await metadataService . fetchMetadataForVersion ( params ) ;
4244 res . status ( 200 ) . json ( response ) ;
@@ -58,6 +60,7 @@ const controller = {
5860 const versionIds = mixedQueryToArray ( req . query . versionId ) ;
5961 const s3VersionIds = mixedQueryToArray ( req . query . s3VersionId ) ;
6062 const tagging = req . query . tagset ;
63+ const bucketId = mixedQueryToArray ( req . query . bucketId ) ;
6164
6265 const params = {
6366 versionIds : versionIds ? versionIds . map ( id => addDashesToUuid ( id ) ) : versionIds ,
@@ -67,6 +70,7 @@ const controller = {
6770 // if scoping to current user permissions on objects
6871 if ( getConfigBoolean ( 'server.privacyMask' ) ) {
6972 params . userId = await userService . getCurrentUserId ( getCurrentIdentity ( req . currentUser , SYSTEM_USER ) ) ;
73+ params . bucketId = bucketId ?. length ? bucketId : undefined ;
7074 }
7175 const response = await tagService . fetchTagsForVersion ( params ) ;
7276 res . status ( 200 ) . json ( response ) ;
0 commit comments