Advanced Permissions (à la Postgres RLS, #280)
You can now tweak your permissions to allow or deny access under certain conditions, as well as for permissions that supports it, filter the resource requested. Each permission has their own context, e.g. for data permissions, which entity is requested is part of the context. Starting with data permissions, you can now choose the policy effect to filter the resource, which adds an immutable filter to the query to isolate your data just like you can do with Postgres' Row Level Security (RLS). Unlike with Postgres, you can perform these changes visually with the same query syntax you already use with where clauses when fetching data.
This is just the beginning. In coming releases, the context and filter capabilities for each permission will be improved.
v0.19_advanced_permissions_xo.mp4
Finalized Deno Support (#288)
Deno, just like any other JavaScript runtime, was already working with bknd. One main pitfall is how to serve the admin UI, and in case of Deno, this was the last missing step to gain full compatibility. Other runtimes, such as Node.js and Bun are relying on node_modules, which bknd then can serve the static assets from. However, on Deno, this may or may not be the case. Therefore you're offered 3 distinct ways to serve the static assets to cover every use case you may have:
- use
serveStaticViaImportto dynamically import the assets (recommended) - use
serveStaticto serve copied assets (usingcopy-assetscommand) from your local directory - use
adminOptions.assetsPathto fetch the assets from a remote location
Get started by reading the Deno integration guide. Deno has been added to the starters, so you can spin up a new project by running:
deno run npm:bknd create -i denoMode helpers (#285)
The ability to run bknd in different modes (ui-only, code-only, hybrid) is great, but it requires a setup. To make this easier, bknd now offers 2 new mode helpers code and hybrid, to give you jump start:
- built-in syncing of config, types and secrets
- let bknd automatically sync the data schema in development
- automatically switch modes in hybrid (from db to code) in production
- automatically skip config validation in production to boost performance
Read more about the Mode helpers in the docs.
Other Changes
- feat: timestamps plugin by @dswbx in #277
- feat: batch schema manager statements by @dswbx in #273
- feat: add media option to module to restrict body max size by @dswbx in #272
- feat: add helper methods for auth cookie headers by @dswbx in #271
- feat: add role selection and auth checks in user create command by @dswbx in #270
- Update docker image by @stormbyte in #281
- fix: SDK improvements to API and
useAuthfor remote instance by @dswbx in #284 - fix: dropzone improve mime type validation by @dswbx in #279
- feat: add endpoint/tool to retrieve TypeScript definitions for data entities by @dswbx in #286
Full Changelog: v0.18.1...v0.19.0