2 categories = ["Releases"]
4 title = "Beta Release v0.30.0"
5 date = 2020-09-20T09:30:00Z
7 image = "/images/blog-cover-images/library-priscilla-du-preez.jpg"
8 description = "The v0.30 release introduces the audit log, adds chapters to the API, improves code editing and more"
9 slug = "beta-release-v0-30-0"
13 Although intended to be a quick release cycle, v0.30 is now here 5 months after the last major release. Sketchy personal health, a poorly pet & a busy day-job workload, combined with constant working-from-home, have reduced the amount of time I could afford to spare working on the project but with normality somewhat returning I present BookStack v0.30 which includes an assortment of enhancements.
16 * [Update instructions](https://www.bookstackapp.com/docs/admin/updates)
17 * [GitHub release page](https://github.com/BookStackApp/BookStack/releases/tag/v0.30.0)
20 Before we get into the features, just a couple of important advisories:
23 **Security Notice** - Possible Privilege Escalation
25 Thanks to [@Defelo](https://github.com/BookStackApp/BookStack/issues/2105)
26 it was advised that current privilege escalation situations are not made clear when applying role permissions.
27 Any user with a "Manage app settings", "Manage users" or "Manage roles & role permissions" system permission
28 assigned to one of their roles could technically alter their own permissions to gain wider access.
29 A clear advisory of these cases has been added in the UI in v0.30
30 but admins are advised to review which users have these permissions with the above in mind.
33 **LDAP & SAML Group Matching** - Potential Change
35 Thanks to [@nem1989](https://github.com/BookStackApp/BookStack/issues/2032) it was found that
36 BookStack roles would be matched to LDAP/SAML groups based upon the role display name, which is expected,
37 but only those roles with a matching "name" value would be considered for this matching. This "name" field was redundant,
38 and has now been removed, but it would store a cleaned version the first-set name of the role.
39 All roles will now be considered before being matched on name which may mean that roles which did not sync before,
40 that would have been expected to based on their name, may now start to sync.
45 User activity within BookStack is shown across various locations of the system but it's
46 always shown to a limited length. Additionally, there are some activities that havn't been
47 visible without database access such as item deletions.
49 As of v0.30 you can now see an audit log interface if you have permission to both "Manage
50 System Settings" and "Manage Users". This is an unfiltered list of the activities that are
51 currently logged to the database by BookStack. Here's how this looks:
53 
55 In this interface you're able to set a date range for activities in addition to being able to filter by activity type.
56 In future releases we'll look to track more activity types and bring them into this interface.
58 ### Code Block Editing Session History
60 Many people use BookStack to display and store code snippets so the code block editor can be core to the workflow of
61 many users within the platform. Unfortunately, since the code block editor opened in a popup,
62 it was fairly easy to lose changes by clicking the popup close button or by accidentally clicking
65 In v0.30 we've added session history to the code block editor:
67 
69 Any event that causes the popup to close will now save a copy of the contents into the browser's session
70 history. Within the editor you'll see a "Session History" link, if anything is in the store, with a dropdown
71 of times showing when code was saved. Clicking one of those times will update the editor with the code saved
72 at that time. Note, This store is temporary and intended for short-term recovery where needed; In most browsers
73 this data will be cleared as soon as the browser tab is closed.
76 ### Attachment Link Insertion
78 The process of inserting attachments into your page content has now been streamlined.
79 A new link button found on the attachment list, when editing a page, allows you to
80 insert an attachment link, with the correct attachment name, into the page content with a single click.
82 
85 On FireFox, or any browser when using the MarkDown editor, you can also drag the attachment card directly
86 into your page content. Unfortunately chromium based browser's drag+drop handling, combined with the WYSIWYG editor's
87 own event handling, proved too troublesome to implement this reliably for that environment.
90 ### API Update - Chapters
92 Work continues on the API to bring us chapter endpoints in this release.
93 As we have for Books, this includes endpoints for exporting to the same
94 formats that we support via the standard UI.
96 
98 Next up, we'll be looking to implement endpoints for pages.
99 If you've played with the API I'd love to hear your feedback in this [GitHub issue](https://github.com/BookStackApp/BookStack/issues/1852).
103 Since releasing dark mode in v0.29 we've had feedback regarding some choices
104 made in addition to a good set of bugs being reported and fixed.
106 When implementing dark mode I made the choice to use CSS filters to alter the saturation
107 and brightness of imagery in the hopes it would make content sit within the theme better.
108 After feedback I realise this was a bad decision; It's effectively altering core user-content
109 which should remain in control of the user/editor. In addition, these filters could massively
110 affect the legibility of screenshots and similar text-based imagery. Use of these filters on
111 images has been removed in v0.30.
113 ### Removal of Vue.js
115 I absolutely love Vue.js, I've been a heavy user of the library with it being my go-to JS framework
116 since version 1.0 after jumping ship from Angular 1. Therefore I used it to drive some of the more
117 dynamic elements of BookStack such as the image manager and attachments interface. Within BookStack, I
118 try to limit JS usage where possible, looking at native back-end solutions before jumping to JS solutions.
119 For smaller dynamic tasks I've slowly built up small set of "components" written in fairly basic plain JS for tasks
120 such as handling dropdowns and complex select menus.
122 The trouble with frameworks such as Vue is that they ideally need to own the DOM from the point they're attached to downwards.
123 That leads to friction with the little JS "components" we had elsewhere as they'd either need to be re-written as a
124 Vue component or an adapter would need to be created to "wire" the component into Vue.
126 As much as I love Vue, it wasn't really needed in BookStack and we were not really using the full power of the framework.
127 In v0.30 I've converted the existing Vue usages to a combination of back-end driven logic and an extended form of the plain JS
128 components we already had. The removal of Vue brings a small reduction in the initial JS bundle download size in addition
129 to a greater reduction of code being ran on each page load, leading to a more responsive interface overall.
131 As part of these changes I've also spent some time trying to document and standardise
132 an approach for these plain JS components [which can be seen here](https://github.com/BookStackApp/BookStack/blob/9e11fc33fa6cf657b35af97a268210ec447c59a7/dev/docs/components.md). I'm slowly updating the older components
133 in the system to conform to these changes.
135 ### Removal of Webpack
137 Unlike Vue.js, I've never really liked Webpack due to the many hours I've wasted trying to integrate
138 Webpack based build systems into existing projects. That said, I've always respected the Webpack project and
139 it's developers for the developed ecosystem and the sheer amount Webpack is able to do.
141 As of v0.30 we have removed Webpack from the development flow of BookStack. Instead we're now using
142 SASS directly for CSS builds (Thanks [@timoschwarzer](https://github.com/BookStackApp/BookStack/pull/2166) for swapping
143 this to the newer dart-sass during this release cycle) and using [esbuild](https://github.com/evanw/esbuild) for JS building & bundling. Our build systems
144 are all simply [npm scripts which can be seen here](https://github.com/BookStackApp/BookStack/blob/9e11fc33fa6cf657b35af97a268210ec447c59a7/package.json#L4-L9).
146 In addition to a simpler setup, these changes bring some good performance improvements; As a rough example, These changes bring the development build time of both JS & CSS down from about 2.7 seconds to about 1.5 seconds on my development system.
148 ### Failed Access Logging
150 Thanks to [@benrubson](https://github.com/BookStackApp/BookStack/pull/1881) it's now possible for failed login events
151 to be logged. This will function for both the standard email & password login as well as LDAP logins.
153 To enable this you simple need to define the `LOG_FAILED_LOGIN_MESSAGE` option in your `.env` file like so:
156 LOG_FAILED_LOGIN_MESSAGE="Failed login for %u"
159 The optional "%u" element of the message will be replaced with the username or email provided in the login attempt
160 when the message is logged. By default messages will be logged via the php `error_log` function which, in most
161 cases, will log to your webserver error log files.
165 As always our terrific translating tribe continue to provide their awesome efforts as this release brings updates
166 to the below languages by the following fantastic Crowdin & GitHub members:
168 * Orenda (OREDNA) - *Bulgarian*
169 * Marek Pavelka (marapavelka) - *Czech*
170 * Venkinovec - *Czech*
171 * Tommy Ku (tommyku) - *Japanese*, *Chinese Traditional*
172 * Michał Bielejewski (bielej) - *Polish*
173 * jozefrebjak - *Slovak*
174 * Ikhwan Koo (Ikhwan.Koo) - *Korean*
175 * Whay (remkovdhoef) - *Dutch*
176 * jc7115 - *Chinese Traditional*
177 * 주서현 (seohyeon.joo) - *Korean*
178 * nutsflag - *French*
179 * Mykola Ronik (Mantikor) - *Ukrainian*
180 * ReadySystems - *Arabic*
182 * Rodrigo Saczuk Niz (rodrigoniz) - *Portuguese, Brazilian*
183 * HFinch - *German*, *German Informal*
184 * cipi1965 - *Italian*
185 * brechtgijsens - *Dutch*
186 * Emil Petersen (emoyly) - *Danish*
187 * Leonardo Mario Martinez (leonardo.m.martinez) - *Spanish, Argentina*
188 * Lowkey (v587ygq) - *Chinese Simplified*
189 * Statium - *Russian*
190 * Alex Lee (qianmengnet) - *Chinese Simplified*
191 * Ali Yasir Yılmaz (ayyilmaz) - *Turkish*
192 * sdl-blue - *German Informal*
194 * Julio Alberto García (Yllelder) - *Spanish*
195 * Beenbag - *German*, *German Informal*
196 * Roy van Schaijk (royvanschaijk) - *Dutch*
197 * Simsimpicpic - *French*
198 * Zenahr Barzani (Zenahr) - *German*, *Japanese*, *Dutch*, *German Informal*
199 * tatsuya.info - *Japanese*
201 * Jakub “Jéžiš” Bouček (jakubboucek) - *Czech*
202 * [@Honvid](https://github.com/BookStackApp/BookStack/pull/2157) - *Chinese Simplified*
204 ### Full List of Changes
206 * Added API endpoints for chapters.
207 * Added audit log to the settings area. ([#2173](https://github.com/BookStackApp/BookStack/issues/2173), [#1167](https://github.com/BookStackApp/BookStack/issues/1167))
208 * Added the ability to insert an attachment link directly into the current editor window. ([#1460](https://github.com/BookStackApp/BookStack/issues/1460))
209 * Added session-based code-block editor auto-save to prevent potential loss of content. ([#1398](https://github.com/BookStackApp/BookStack/issues/1398))
210 * Added warning wording around role system permissions to indicate what permissions could allow privilege escalation. ([#2105](https://github.com/BookStackApp/BookStack/issues/2105))
211 * Added the ability to log login failures to a file. Thanks to [@benrubson](https://github.com/BookStackApp/BookStack/pull/1881). ([#1881](https://github.com/BookStackApp/BookStack/pull/1881), [#728](https://github.com/BookStackApp/BookStack/issues/728))
212 * Updated Simplified Chinese translations. Thanks to [@Honvid](https://github.com/BookStackApp/BookStack/pull/2157). ([#2157](https://github.com/BookStackApp/BookStack/pull/2157))
213 * Updated WYSIWYG editor css to put editor in its own layer to improve degraded dark mode performance. ([#2154](https://github.com/BookStackApp/BookStack/issues/2154))
214 * Updated Czech translations. Thanks to [@jakubboucek](https://github.com/BookStackApp/BookStack/pull/2238). ([#2238](https://github.com/BookStackApp/BookStack/pull/2238))
215 * Updated permission system so that the permission map table does not contain ID's since database limits could be met in scenarios where permissions were automatically refreshed on a frequent basis. ([#2091](https://github.com/BookStackApp/BookStack/issues/2091))
216 * Updated to role table in the database to remove a redundant name field which fixes issue where changing a role name would not change the name used to match with LDAP groups. ([#2032](https://github.com/BookStackApp/BookStack/issues/2032))
217 * Updated URL slug generation to achieve a much cleaner result when non-ascii characters are used. Thanks to [@drzippie](https://github.com/BookStackApp/BookStack/pull/2165). ([#2165](https://github.com/BookStackApp/BookStack/pull/2165), [#2026](https://github.com/BookStackApp/BookStack/issues/2026), [#1765](https://github.com/BookStackApp/BookStack/issues/1765))
218 * Updated error reporting so that not-found errors are not written to the log, causing logs to fill much quicker than expected. ([#2110](https://github.com/BookStackApp/BookStack/issues/2110))
219 * Updated dark mode styles to remove filters applied to images so that they display as expected. ([#2045](https://github.com/BookStackApp/BookStack/issues/2045))
220 * Removed Vue.js from project & started standardisation of custom basic component system. ([#2202](https://github.com/BookStackApp/BookStack/issues/2202))
221 * Replaced dev usage of node-sass with dart-sass. Thanks to [@timoschwarzer](https://github.com/BookStackApp/BookStack/pull/2166). ([#2166](https://github.com/BookStackApp/BookStack/pull/2166))
222 * Fixed issue where, upon role delete, users would not be migrated when specified to during role delete flow. ([#2211](https://github.com/BookStackApp/BookStack/issues/2211))
223 * Fixed issue where the system would error on upload of images that contain a hash in the name. ([#2161](https://github.com/BookStackApp/BookStack/issues/2161))
224 * Fixed scenario where page drafts would show as saved where request would actually fail, leading to loss of data. Added a browser-side storage mechanism for emergency use. ([#2150](https://github.com/BookStackApp/BookStack/issues/2150))
225 * Fixed issue where LDAP groups would not sync on initial login due to the email confirmation system taking over before the group sync would run. ([#2082](https://github.com/BookStackApp/BookStack/issues/2082))
226 * Fixed issue where the redirect upon login could lead to an external site. ([#2073](https://github.com/BookStackApp/BookStack/issues/2073))
227 * Fixed low visibility of horizontal lines when dark mode is in use. ([#2209](https://github.com/BookStackApp/BookStack/issues/2209))
228 * Fixed issue where HTML entities would be seen in page preview content. Thanks to [@mr-vinn](https://github.com/BookStackApp/BookStack/pull/2257). ([#2257](https://github.com/BookStackApp/BookStack/pull/2257), [#2114](https://github.com/BookStackApp/BookStack/issues/2114))
229 * Fixed issue where previous page content would be indexed upon save instead of the fresh content. ([#2042](https://github.com/BookStackApp/BookStack/issues/2042))
230 * Fixed issue where an error would be thrown on SAML logout request from the IdP. ([#2002](https://github.com/BookStackApp/BookStack/issues/2002))
231 * Fixed bad pagination styling which would result in invisible numbering. ([#1839](https://github.com/BookStackApp/BookStack/issues/1839))
232 * Fixed incorrect and misleading behaviour when saving a comment with no content. ([#1836](https://github.com/BookStackApp/BookStack/issues/1836))
237 For v0.31 my main focus will be adding pages to the API which will be a bit more involved than the other endpoints we've added so far. That would complete the core API endpoints I wanted to initially implement; After that I'll allow issues to be created to request other API endpoints that people may need.
239 Now that I've added the audit log I'd like to expand the activities we track to include things such as setting changes, logins & user creations so that admins will be able to review administration operations. As part of that work I'll try to start a deeper scoping into how content notifications could fit into the application.
241 I've opened a proposal to implement proper "Owner" controls, [which can be seen here](https://github.com/BookStackApp/BookStack/issues/2246). At the moment the permission system has the ability to apply different permissions for someone's own content but this currently relates to the creator. This causes issues in scenarios where someone would create elements, such as a book, on behalf of another user. These changes would mean a "Owner" user would be assigned to each item, the creator by default, but that "Owner" could easily be re-assigned where required. I'll likely implement this as part of the next release cycle unless there are any major concerns.
245 <span style="font-size: 0.8em;opacity:0.9;">Header Image Credits: <span>Photo by <a href="https://unsplash.com/@priscilladupreez?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Priscilla Du Preez</a> on <a href="https://unsplash.com/s/photos/books?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span></span>