tauri icon indicating copy to clipboard operation
tauri copied to clipboard

refactor(core): add allowlist for window creation options

Open lucasfernog opened this issue 3 years ago • 3 comments

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Docs
  • [ ] New Binding issue #___
  • [ ] Code style update
  • [x] Refactor
  • [ ] Build-related changes
  • [ ] Other, please describe:

Does this PR introduce a breaking change?

  • [ ] Yes, and the changes were approved in issue #___
  • [ ] No

Checklist

  • [ ] When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • [x] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • [ ] I have added a convincing reason for adding this feature, if necessary

Other information

lucasfernog avatar Oct 03 '22 22:10 lucasfernog

Is it just me or is adding a flag for every single option is a little extreme?

This way everyone would probably just opt for "all": true again.

FabianLars avatar Oct 07 '22 17:10 FabianLars

I was discussing that with @tweidinger

lucasfernog avatar Oct 07 '22 21:10 lucasfernog

Is it just me or is adding a flag for every single option is a little extreme?

This way everyone would probably just opt for "all": true again.

Yep, this is not an ideal solution but better than the current state (where every additional window could possibly be abused for things like global clipboard access without honoring the main window permissions). I also mentioned that it could be nice to add a flag for permission inheritance, so it is possible to configure it but not necessarily needed.

My quote from the chat on this pr:

I think thats the straightforward way for it currently👍 Offtopic: It gets more interesting when thinking about window specific allowlists. Something like a toggle for allowlist inheritance inheritWindowOptions or allowlist templates windowChildrenOptions could be options in the future.

tweidinger avatar Oct 07 '22 21:10 tweidinger