Saltcorn 0.6.3 - Slugs, Two-factor authentication

By Tom Nielsen
Published on 

Saltcorn 0.6.3 contains the following changes:

Slugs: URLs  to views become a lot prettier if you choose a slug for the view – this nominates a field which becomes part of the URLitself rather than the query string. Previously, when you wanted to show a specific row in a table, you had to specify its ID (or another unique field) in the query string, for instance /view/post?id=5 or /view/post?title=My%20First%20Post. Now you can nominate a field that will be part of the URL path. If this is an ID, the URL path becomes /view/post/5. If it is a string, Saltcorn will turn it into the lowercase and hyphenated slug titles you often see on blogs: /view/post/my-first-post

Two factor authentication: you can now enable two factor authentication with time-based one-time passwords (TOTP) using authenticator apps. The administrator can decide, for each role, whether two factor authentication is disabled, optional or mandatory.

Edit actions: some new actions are now available in Edit views (forms). These can be selected when creating an action and will be shown to the user as buttons or links

  • Reset – revert the form to its originally loaded state, thus discarding any edits made by the user
  • Save and continue – save the changes made by the user to the database, without navigating to a new page
  • Go back (also available as actions on Show views and on pages) – go back to the previous page in the browser’s history. This has to same effect as pressing the back button.
  • Auto-save: not an action but an option when considering an edit view – save any changes made by the user instantly to the database, without navigating to a new page

Join fields from one-to-one relationships: one-to-one relationships can be a bit tricky; they are created with a foreign key on one of the tables to the other table, and then marking this foreign key as unique. Such fields are now be treated as join fields in List and Show views, so you can display the value from the joined table

List and Feed include formula – List and Feed views can now be configured with a formula to indicate which rows should be included in the view


Recent posts