juci-file: change from read/write_tmp to read/write_tmp_juci refs #15495
authorReidar Cederqvist <reidar.cederqvist@gmail.com>
Wed, 25 Jul 2018 13:28:17 +0000 (15:28 +0200)
committerSukru Senli <sukru.senli@iopsys.eu>
Sat, 8 Sep 2018 11:40:39 +0000 (13:40 +0200)
juci/access.json
juci/src/factories/files.js
plugins/juci-iup/access.json
plugins/juci-mod-system/access.json
plugins/juci-network-netifd/access.json
plugins/juci-openvpn/access.json
plugins/juci-sysupgrade/access.json

index bf351ab..b4ed3e8 100644 (file)
@@ -20,8 +20,8 @@
                "read": {
                        "ubus": {
                                "file": [
-                                       "read_tmp",
-                                       "write_tmp"
+                                       "read_tmp_juci",
+                                       "write_tmp_juci"
                                ]
                        }
                }
index b70f314..3d12aff 100644 (file)
@@ -46,7 +46,7 @@ JUCI.app.factory("$file", function($rpc, $tr, gettext, $rootScope){
                                        console.log("error reading file");
                                        setTimeout(function(){$rootScope.uploadFile = false; def.reject("error reading file");}, 0);
                                }
-                               $rpc.$call("file", "write_tmp", {
+                               $rpc.$call("file", "write_tmp_juci", {
                                        path: path,
                                        data: e.target.result.split(",")[1],
                                        base64: true,
@@ -93,7 +93,7 @@ JUCI.app.factory("$file", function($rpc, $tr, gettext, $rootScope){
                        }
                        var name = (downloadName)?downloadName:fileName;
                        var filetype = filetype || "application/gzip";
-                       $rpc.$call("file", "read_tmp", {path:"/tmp/juci/"+fileName, base64:true}).done(function(result){
+                       $rpc.$call("file", "read_tmp_juci", {path:"/tmp/juci/"+fileName, base64:true}).done(function(result){
                                $rootScope.downloadFile = false;
                                def.resolve(saveByteArray(result.data, name, filetype, link));
                        }).fail(function(e){ $rootScope.downloadFile = false; def.reject(e);});
@@ -103,7 +103,7 @@ JUCI.app.factory("$file", function($rpc, $tr, gettext, $rootScope){
                        var def = $.Deferred();
                        if(!filename || !string) return def.reject("you must give filename and string");
                        if(filename.substr(0,5) !== "/tmp/") filename = "/tmp/" + filename;
-                       $rpc.$call("file", "write_tmp", {"path":filename, "data":string}).done(function(ret){def.resolve(ret);}).fail(function(e){def.reject(e);});
+                       $rpc.$call("file", "write_tmp_juci", {"path":filename, "data":string}).done(function(ret){def.resolve(ret);}).fail(function(e){def.reject(e);});
                        return def.promise();
                }
        }
index 3da6bb4..812dfa3 100644 (file)
@@ -7,7 +7,7 @@
                                        "backup"
                                ],
                                "file": [
-                                       "read_tmp"
+                                       "read_tmp_juci"
                                ]
                        },
                        "uci": [
index 31d2253..7cee468 100644 (file)
@@ -52,8 +52,8 @@
                "read": {
                        "ubus": {
                                "file": [
-                                       "read_tmp",
-                                       "write_tmp"
+                                       "read_tmp_juci",
+                                       "write_tmp_juci"
                                ]
                        }
                }
index 8deaad1..3bbe27d 100644 (file)
@@ -56,7 +56,7 @@
                                        "stats"
                                ],
                                "file": [
-                                       "read_tmp"
+                                       "read_tmp_juci"
                                ]
                        },
                        "uci": [
index ebe52d6..f7835c3 100644 (file)
@@ -11,8 +11,8 @@
                                        "set_config"
                                ],
                                "file": [
-                                       "read_tmp",
-                                       "write_tmp"
+                                       "read_tmp_juci",
+                                       "write_tmp_juci"
                                ]
                        }
                },
index b561433..81e5df0 100644 (file)
@@ -4,7 +4,7 @@
                "read": {
                        "ubus": {
                                "file": [
-                                       "write_tmp"
+                                       "write_tmp_juci"
                                ],
                                "juci.sysupgrade": [
                                        "check",