@@ -78,7 +78,7 @@ class HttpAPIServer {
7878
7979 app.post ('/s5/upload/directory' , (req, res) async {
8080 final auth = await node.checkAuth (req, 's5/upload/directory' );
81- if (auth.denied) return res.unauthorized (auth);
81+ if (auth.denied || auth.restricted ) return res.unauthorized (auth);
8282
8383 if (node.store == null ) {
8484 throw 'No store configured, uploads not possible' ;
@@ -119,7 +119,7 @@ class HttpAPIServer {
119119
120120 app.post ('/s5/upload' , (req, res) async {
121121 final auth = await node.checkAuth (req, 's5/upload' );
122- if (auth.denied) return res.unauthorized (auth);
122+ if (auth.denied || auth.restricted ) return res.unauthorized (auth);
123123
124124 if (node.store == null ) {
125125 throw 'No store configured, uploads not possible' ;
@@ -223,7 +223,7 @@ class HttpAPIServer {
223223 // TODO Add ?routingHints=
224224 app.post ('/s5/pin/:cid' , (req, res) async {
225225 final auth = await node.checkAuth (req, 's5/pin' );
226- if (auth.denied) return res.unauthorized (auth);
226+ if (auth.denied || auth.restricted ) return res.unauthorized (auth);
227227
228228 final cid = CID .decode (req.params['cid' ]);
229229
@@ -330,7 +330,7 @@ class HttpAPIServer {
330330
331331 app.post ('/s5/upload/tus' , (req, res) async {
332332 final auth = await node.checkAuth (req, 's5/upload/tus' );
333- if (auth.denied) return res.unauthorized (auth);
333+ if (auth.denied || auth.restricted ) return res.unauthorized (auth);
334334
335335 final uploadLength = int .parse (req.headers.value ('upload-length' )! );
336336
@@ -380,7 +380,7 @@ class HttpAPIServer {
380380
381381 app.post ('/s5/import/http' , (req, res) async {
382382 final auth = await node.checkAuth (req, 's5/import/http' );
383- if (auth.denied) return res.unauthorized (auth);
383+ if (auth.denied || auth.restricted ) return res.unauthorized (auth);
384384
385385 if (node.store == null ) {
386386 throw 'No store configured, uploads not possible' ;
@@ -708,6 +708,8 @@ class HttpAPIServer {
708708
709709 final map = node.getCachedStorageLocations (hash, [
710710 storageLocationTypeFull,
711+ storageLocationTypeFile,
712+ storageLocationTypeBridge,
711713 ]);
712714
713715 final availableNodes = map.keys.toList ();
@@ -914,6 +916,11 @@ class HttpAPIServer {
914916 }
915917 }
916918
919+ if (cid == null && request.uri.path.startsWith ('/s5/admin/app' )) {
920+ // ! Admin Web UI
921+ cid = CID .decode ('zrjD3HKdKj56sTsHcFd5XhcVf72SGFVZQnMDq2RuYCe7Hiw' );
922+ }
923+
917924 if (cid == null ) {
918925 try {
919926 cid = CID .decode (parts[0 ]);
0 commit comments