Component views
Views are custom screens that a component adds to the dashboard. You build them in the component's view editor.
Limitations
Views aren't isolated
Views run in the dashboard with the viewer's permissions. Anyone with settings <ref> can change a view, and the change reaches every viewer, the Owner included. Views are not isolated and can't be limited.
The view editor shows this notice, with <ref> replaced by the component's ref (for example settings orders).
What it means for you:
- A view acts as whoever is looking at it. If an Owner opens it, it runs with the Owner's permissions.
- Whoever holds
settings <ref>on the component can change the view. Treat that permission as access to every viewer's session. - You can't narrow what a view may do. Review changes to a view the way you review code that runs as its viewers.
- Grant
settings <ref>only to people you trust with every viewer's permissions.
Views are not run identities. They have no run_as. Code that runs as an identity is covered in Run identity.
Treat input a view receives as untrusted, like any other input. Code that lets an input choose where data goes, or skip a check, is a bug in that code.