tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

[feat] An fs:scope that wraps all permisions at once

Open Eduard20CR opened this issue 1 year ago • 1 comments

Describe the problem

I had to make a like 50 permisions like this:

{ "identifier": "fs:allow-appdata-write", "allow": [ { "path": "" }, { "path": "/" }, { "path": "/**/" } ] },

Just to be able to remove files.

Describe the solution you'd like

Something like: { "identifier": ["fs:scope-1", "fs:scope-2"], "allow": [ { "path": "" }, { "path": "/" }, { "path": "/**/" } ] },

or

{ "identifier": "fs:all", "allow": [ { "path": "" }, { "path": "/" }, { "path": "/**/" } ] },

Alternatives considered

No response

Additional context

PD: I love tauri

Eduard20CR avatar Oct 08 '24 21:10 Eduard20CR

Update: Actually, there are some scopes that do that, skill issue :). But it would be great if we can make it move clear on the documentation. Thanks!

 {
      "identifier": "fs:allow-remove",
      "allow": [
        {
          "path": "**"
        },
        {
          "path": "**/*"
        },
        {
          "path": "/**/*"
        }
      ]
    },
    {
      "identifier": "fs:write-all",
      "allow": [
        {
          "path": "**"
        },
        {
          "path": "**/*"
        },
        {
          "path": "/**/*"
        }
      ]
    },
    {
      "identifier": "fs:read-all",
      "allow": [
        {
          "path": "**"
        },
        {
          "path": "**/*"
        },
        {
          "path": "/**/*"
        }
      ]
    }

Eduard20CR avatar Oct 08 '24 21:10 Eduard20CR