Cbi FileUpload acl denied

Does anyone know how to get around the acl restriction while uploading files via
cbi class FileUpload from /usr/lib/lua/luci/cbi.lua
Do i have to register my app somehow?

I am new to luci programming.
Thanks

solved it myself your help is realy not needed.
I still have a wiki account from far back when i contributed a mirror and some translations. Will create a documentation when i am done with my work.
Nice to see that you guys moved over the accounts to the new wiki!

(the example app is called luci-app-file)
code:

file = ucs:taboption("general", FileUpload, "file", translate("upload  file"))
file.enable_remove = false; -- deny delete
file.root_directory = "/tmp"; -- root of file browser
conf_file.acl_depends = { "luci-app-file" }    -- needs to correspond with the file /usr/share/rpcd/acl.d/luci-myapp.json

/usr/share/rpcd/acl.d/luci-app-file.json:

    "luci-app-file": {
            "description": "Grant access to luci-app-file",
            "write": {
                    "cgi-io": [ "upload" ],
                    "file": {
                            "/tmp/*": [ "write" ]
                    }
            }
    }

}

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.