@@ -293,22 +293,6 @@ impl AsyncStorage {
293293 }
294294 }
295295
296- #[ instrument]
297- pub ( crate ) async fn get_public_access ( & self , path : & str ) -> Result < bool > {
298- match & self . backend {
299- StorageBackend :: Database ( db) => db. get_public_access ( path) . await ,
300- StorageBackend :: S3 ( s3) => s3. get_public_access ( path) . await ,
301- }
302- }
303-
304- #[ instrument]
305- pub ( crate ) async fn set_public_access ( & self , path : & str , public : bool ) -> Result < ( ) > {
306- match & self . backend {
307- StorageBackend :: Database ( db) => db. set_public_access ( path, public) . await ,
308- StorageBackend :: S3 ( s3) => s3. set_public_access ( path, public) . await ,
309- }
310- }
311-
312296 /// Fetch a rustdoc file from our blob storage.
313297 /// * `name` - the crate name
314298 /// * `version` - the crate version
@@ -935,15 +919,6 @@ impl Storage {
935919 self . runtime . block_on ( self . inner . exists ( path) )
936920 }
937921
938- pub ( crate ) fn get_public_access ( & self , path : & str ) -> Result < bool > {
939- self . runtime . block_on ( self . inner . get_public_access ( path) )
940- }
941-
942- pub ( crate ) fn set_public_access ( & self , path : & str , public : bool ) -> Result < ( ) > {
943- self . runtime
944- . block_on ( self . inner . set_public_access ( path, public) )
945- }
946-
947922 pub ( crate ) fn fetch_source_file (
948923 & self ,
949924 name : & str ,
@@ -1546,35 +1521,6 @@ mod backend_tests {
15461521 Ok ( ( ) )
15471522 }
15481523
1549- fn test_set_public ( storage : & Storage ) -> Result < ( ) > {
1550- let path: & str = "foo/bar.txt" ;
1551-
1552- storage. store_blobs ( vec ! [ BlobUpload {
1553- path: path. into( ) ,
1554- mime: mime:: TEXT_PLAIN ,
1555- compression: None ,
1556- content: b"test content\n " . to_vec( ) ,
1557- } ] ) ?;
1558-
1559- assert ! ( !storage. get_public_access( path) ?) ;
1560- storage. set_public_access ( path, true ) ?;
1561- assert ! ( storage. get_public_access( path) ?) ;
1562- storage. set_public_access ( path, false ) ?;
1563- assert ! ( !storage. get_public_access( path) ?) ;
1564-
1565- for path in & [ "bar.txt" , "baz.txt" , "foo/baz.txt" ] {
1566- assert ! (
1567- storage
1568- . set_public_access( path, true )
1569- . unwrap_err( )
1570- . downcast_ref:: <PathNotFoundError >( )
1571- . is_some( )
1572- ) ;
1573- }
1574-
1575- Ok ( ( ) )
1576- }
1577-
15781524 fn test_get_object ( storage : & Storage ) -> Result < ( ) > {
15791525 let path: & str = "foo/bar.txt" ;
15801526 let blob = BlobUpload {
@@ -1593,9 +1539,6 @@ mod backend_tests {
15931539 // it seems like minio does it too :)
15941540 assert_eq ! ( found. etag, Some ( compute_etag( & blob. content) ) ) ;
15951541
1596- // default visibility is private
1597- assert ! ( !storage. get_public_access( path) ?) ;
1598-
15991542 for path in & [ "bar.txt" , "baz.txt" , "foo/baz.txt" ] {
16001543 assert ! (
16011544 storage
@@ -1604,14 +1547,6 @@ mod backend_tests {
16041547 . downcast_ref:: <PathNotFoundError >( )
16051548 . is_some( )
16061549 ) ;
1607-
1608- assert ! (
1609- storage
1610- . get_public_access( path)
1611- . unwrap_err( )
1612- . downcast_ref:: <PathNotFoundError >( )
1613- . is_some( )
1614- ) ;
16151550 }
16161551
16171552 Ok ( ( ) )
@@ -2065,7 +2000,6 @@ mod backend_tests {
20652000 test_delete_prefix_without_matches,
20662001 test_delete_percent,
20672002 test_exists_without_remote_archive,
2068- test_set_public,
20692003 }
20702004
20712005 tests_with_metrics {
0 commit comments