{"id": "changelog:log-out", "page": "changelog", "ref": "log-out", "title": "Log out", "content": "The ds_actor cookie can be used by plugins (or by Datasette's --root mechanism ) to authenticate users. The new /-/logout page provides a way to clear that cookie. \n A \"Log out\" button now shows in the global navigation provided the user is authenticated using the ds_actor cookie. ( #840 )", "breadcrumbs": "[\"Changelog\", \"0.45 (2020-07-01)\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/840\", \"label\": \"#840\"}]"} {"id": "changelog:magic-parameters-for-canned-queries", "page": "changelog", "ref": "magic-parameters-for-canned-queries", "title": "Magic parameters for canned queries", "content": "Canned queries now support Magic parameters , which can be used to insert or select automatically generated values. For example: \n insert into logs\n (user_id, timestamp)\nvalues\n (:_actor_id, :_now_datetime_utc) \n This inserts the currently authenticated actor ID and the current datetime. ( #842 )", "breadcrumbs": "[\"Changelog\", \"0.45 (2020-07-01)\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/842\", \"label\": \"#842\"}]"} {"id": "changelog:new-plugin-hooks", "page": "changelog", "ref": "new-plugin-hooks", "title": "New plugin hooks", "content": "register_magic_parameters(datasette) can be used to define new types of magic canned query parameters. \n \n \n startup(datasette) can run custom code when Datasette first starts up. datasette-init is a new plugin that uses this hook to create database tables and views on startup if they have not yet been created. ( #834 ) \n \n \n canned_queries(datasette, database, actor) lets plugins provide additional canned queries beyond those defined in Datasette's metadata. See datasette-saved-queries for an example of this hook in action. ( #852 ) \n \n \n forbidden(datasette, request, message) is a hook for customizing how Datasette responds to 403 forbidden errors. ( #812 )", "breadcrumbs": "[\"Changelog\", \"0.45 (2020-07-01)\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette-init\", \"label\": \"datasette-init\"}, {\"href\": \"https://github.com/simonw/datasette/issues/834\", \"label\": \"#834\"}, {\"href\": \"https://github.com/simonw/datasette-saved-queries\", \"label\": \"datasette-saved-queries\"}, {\"href\": \"https://github.com/simonw/datasette/issues/852\", \"label\": \"#852\"}, {\"href\": \"https://github.com/simonw/datasette/issues/812\", \"label\": \"#812\"}]"}