]> BookStack Code Mirror - website/blob - content/blog/bookstack-release-v22-10.md
Update filesystem-permissions.md
[website] / content / blog / bookstack-release-v22-10.md
1 +++
2 categories = ["Releases"]
3 tags = ["Releases"]
4 title = "BookStack Release v22.10"
5 date = 2022-10-21T10:15:00Z
6 author = "Dan Brown"
7 image = "/images/blog-cover-images/brambles-dan-brown.webp"
8 slug = "bookstack-release-v22-10"
9 draft = false
10 +++
11
12 This spooky season supplies us with BookStack v22.10, which continues our work to improve permission control
13 while bringing along some extra treats, without any tricks.
14
15 * [Release video overview](https://www.youtube.com/watch?v=8kAhZAIV5MM)
16 * [Update instructions](https://www.bookstackapp.com/docs/admin/updates)
17 * [GitHub release page](https://github.com/BookStackApp/BookStack/releases/tag/v22.10)
18
19
20 **Upgrade Notices**
21
22 - **Permission Management Changes** - The interface and logic for managing shelf, book, chapter & page permissions has changed significantly in this release. The following should be noted:
23   - Content permissions that were not active (where the "Enable Custom Permissions" checkbox was unchecked) will be removed upon upgrade to v22.10.
24   - Content permission role entries, that had no permissions provided, will not be reflected/shown as a row in the permissions interface immediately upon upgrade. Instead such cases will be reflected via the "Everyone Else" permission entry being active, in a non-inheriting state, with no permissions set.
25   - There should be no functional change to active permissions upon upgrade. Care has been taken to ensure existing permissions are migrated so that access control remains the same as pre-upgrade.
26
27 ### Redesigned Content Permission Control
28
29 Since content-level (Shelf, Book, Chapter, Page) permissions were added to BookStack they've required, when enabled, a user to manage permissions for all roles in the system. This can often be unintuitive, since a common use-case would be to permit or restrict a single role, but you'd be forced to manage all other roles at the same time. 
30
31 This release looks to address that with a significant revision to how permissions are implemented and managed. 
32 This is what the new revision view looks like:
33
34 ![Screenshot of the new revisions view, with permission set for two roles, with a "Everyone else" option show with permission controls](/images/2022/10/item-permissions.png)
35
36 Content permissions are no longer an "all roles or nothing" scenario. You can now add individual roles to override, so you can manage just the roles you need to work with. Any roles without specific permissions defined can be managed by the "Everyone Else" option shown towards the bottom of the view. By default this will be set to inherit default role permissions, but you can override this to set new baseline permissions. 
37
38 Overall these changes should make permission management much simpler for existing use-cases, while making possible some new useful permission configurations.  
39
40 ### Added Book Read API Endpoint Detail
41
42 While the REST API provided book detail via the `/api/books/<id>` book read endpoint, you'd have to also call two other endpoints to form a view
43 of the chapters & pages within the book, and even then you'd need to apply additional logic to build the content structure and ordering aligned
44 with the BookStack interface. 
45
46 To ease this, the book read endpoint will now return its child chapters and pages, ready ordered and nested as what be seen within the BookStack UI, on a `contents` property like so:
47
48 ```json
49 {
50   "id": 16,
51   "name": "My own book",
52   ...
53   "contents": [
54     {
55       "id": 50,
56       "name": "Bridge Structures",
57       ...
58       "url": "https://example.com/books/my-own-book/chapter/bridge-structures",
59       "type": "chapter",
60       "pages": [
61         {
62           "id": 42,
63           "name": "Building Bridges",
64           ...
65           "url": "https://example.com/books/my-own-book/page/building-bridges"
66         }
67       ]
68     },
69     {
70       "id": 43,
71       "name": "Cool Animals",
72       ...
73       "url": "https://example.com/books/my-own-book/page/cool-animals",
74       "type": "page"
75     }
76   ],
77   ...
78 }
79 ```
80
81 ### System Back-end Maintenance
82
83 During this release cycle I spent a little extra time on cleaning up some existing parts of the codebase, specifically:
84
85 - Updated our tests to use standardised helper methods for common operations.
86 - Clean up authentication routes, removing old entwined Laravel framework auth logic that was barely used. 
87 - Added support for parallel PHPUnit testing for quicker dev environment test runs.
88
89 Gotta keep that codebase clean 🧹🧹🧹
90
91 ### Updated WYSIWYG Table Control Icons
92
93 I'm highlighting this rather subtle change as an example of spending time to make the little things better for users.
94 Upon our upgrade to TinyMCE 5 for the main WYSIWYG editor, it was reported that the new table toolbar icons could be hard to read at a glance.
95 After [some discussion to explore the issues](https://github.com/BookStackApp/BookStack/issues/3397), and some trialling of options, 
96 I spent an hour or two playing with the original icons to tweak spacing and sizing to boost legibility where possible.
97 Here's the result, with the old icons on the top, and the tweaked icons below:
98
99 ![Table toolbar icons comparison, original icons on top, new icons below](/images/2022/10/table-toolbar-icons.png)
100
101 While quite subtle, hopefully this should be notable improvement when glancing at them during editing.
102
103 ### Handling Related Shelves on Book Copy
104
105 We added the ability to copy books late last year in BookStack v21.12. 
106 Something missing from the copy would be any relations to shelves that the original book sat upon.
107 As of this release, copying a book will now also copy its shelf relations, as long as the user
108 performing the copy has permission to edit those shelves (Since they'd effectively be altering its content).
109
110 ### Code Block WYSIWYG Toolbar
111
112 Within the WYSIWYG editor it's always been tricky to edit code blocks on mobile, since it's usually done via a double-click
113 which is often not possible on mobile browsers. This wasn't much of a problem before since the code editor popup was 
114 very mobile unfriendly anyway but, with recent improvements to editing code it's now more likely that users may edit code 
115 on such devices.
116
117 To help access code blocks for edit, a toolbar will now show when a code block is selected with an action that will 
118 open the block for editing:
119
120 ![View of a select code block in the editor with a tooltip above it with a pencil icon button](/images/2022/10/code-block-toolbar.png)
121
122
123 ### MATLAB/Octave Code Block Highlighting
124
125 Code block highlighting support has been added for MATLAB, or GNU Octave, syntax.
126 Along with this, both "MATLAB" and "Octave" are now selectable languages in the WYSIWYG code editor:
127
128 ![View of the BookStack code editor with the "Octave" language selected, with octave language code showing](/images/2022/10/octave-code-highlighting.png)
129
130 ### Translations
131
132 This release adds the language of Greek! A massive thanks to [@Gr-DigiLady](https://github.com/BookStackApp/BookStack/issues/3732) for their great effort in providing the language addition.
133
134 Our usual splendid super scribes have continued their solid work to provide us with the 
135 below translation updates since the original v22.09 release:
136
137 - digilady - *Greek*
138 - Linus (LinusOP) - *Swedish*
139 - HeartCore - *German Informal; German*
140 - Felipe Cardoso (felipecardosoruff) - *Portuguese, Brazilian*
141 - RandomUser0815 - *German*
142 - Vitaliy (gviabcua) - *Ukrainian*
143 - Naoto Ishikawa (na3shkw) - *Japanese*
144 - Leonardo Mario Martinez (leonardo.m.martinez) - *Spanish, Argentina*
145 - Maciej Lebiest (Szwendacz) - *Polish*
146 - Statium - *Russian*
147 - Indrek Haav (IndrekHaav) - *Estonian*
148 - Éric Gaspar (erga) - *French*
149 - sdhadi - *Persian*
150 - pedromcsousa - *Portuguese*
151 - DerLinkman (derlinkman) - *German; German Informal*
152 - 구인회 (laskdjlaskdj12) - *Korean*
153 - LiZerui (CNLiZerui) - *Chinese Traditional*
154 - Mihai Ochian (soulstorm19) - *Romanian*
155 - scureza - *Italian*
156 - m0uch0 - *Spanish*
157 - TurnArabic - *Arabic*
158 - SmokingCrop - *Dutch*
159 - 10935336 - *Chinese Simplified*
160 - Fabrice Boyer (FabriceBoyer) - *French*
161 - Martin Sebek (sebekmartin) - *Czech*
162
163 ### Next Steps
164
165 Since this release cycle was consumed by permissions management, I feel like taking a break from permissions
166 for a month to focus on something else. I'll dig into the issues list and maybe check in with those in Discord to
167 find something fun to work on. May result in a release comprised of smaller-scope improvements. 
168
169 ### Full List of Changes
170
171 **Released in v22.10**
172
173 * Added Greek language. ([#3732](https://github.com/BookStackApp/BookStack/issues/3732))
174 * Added MATLAB code syntax highlighting. ([#3744](https://github.com/BookStackApp/BookStack/issues/3744))
175 * Added toolbar for code blocks in WYSIWYG editor to make mobile editing possible. ([#2815](https://github.com/BookStackApp/BookStack/issues/2815))
176 * Updated content permissions interface & logic to allow more selective/intuitive control. ([#3760](https://github.com/BookStackApp/BookStack/pull/3760))
177 * Update WYSIWYG table toolbar icons to be a little more legible. ([#3397](https://github.com/BookStackApp/BookStack/issues/3397))
178 * Updated auth controller components to not depend on older Laravel library. ([#3745](https://github.com/BookStackApp/BookStack/pull/3745), [#3627](https://github.com/BookStackApp/BookStack/issues/3627))
179 * Updated book copy behaviour to copy book-shelf relations if permissions allow. ([#3699](https://github.com/BookStackApp/BookStack/issues/3699))
180 * Updated books-read API endpoint to list child book/chapter tree. ([#3734](https://github.com/BookStackApp/BookStack/issues/3734))
181 * Updated list style handling to align deeply nested list styling in & out of editor. ([#3685](https://github.com/BookStackApp/BookStack/issues/3685))
182 * Updated shelf book management for easier touch device usage. ([#2301](https://github.com/BookStackApp/BookStack/issues/2301))
183 * Updated tag suggestions to provide more accurate results. ([#3720](https://github.com/BookStackApp/BookStack/issues/3720))
184 * Updated testing to support parallel running. ([#3751](https://github.com/BookStackApp/BookStack/pull/3751))
185 * Updated tests to align/clean-up certain common actions. ([#3757](https://github.com/BookStackApp/BookStack/pull/3757))
186 * Updated translations with latest Crowdin changes. ([#3737](https://github.com/BookStackApp/BookStack/pull/3737))
187 * Fixed custom code block theme not used within the WYSIWYG editor. ([#3753](https://github.com/BookStackApp/BookStack/issues/3753))
188 * Fixed issue where revision delete control would show to those without permission. ([#3723](https://github.com/BookStackApp/BookStack/issues/3723))
189 * Fixed justified text not applying to list content. ([#3750](https://github.com/BookStackApp/BookStack/issues/3750))
190 * Fixed not being able to deselect "Created/Update by me" search options. Thanks to [@Wertisdk](https://github.com/BookStackApp/BookStack/pull/3770). ([#3770](https://github.com/BookStackApp/BookStack/pull/3770), [#3762](https://github.com/BookStackApp/BookStack/issues/3762))
191 * Fixed page popover being hidden behind content in chromium-based browsers. ([#3774](https://github.com/BookStackApp/BookStack/issues/3774))
192 * Fixed SAML2 metadata display depending on external IDP metadata page. ([#2480](https://github.com/BookStackApp/BookStack/issues/2480))
193 * Fixed squashing of columns in users list. ([#3787](https://github.com/BookStackApp/BookStack/issues/3787))
194
195 **Released in v22.09.1**
196
197 * Added PHPCS for project PHP formatting. ([#3728](https://github.com/BookStackApp/BookStack/pull/3728))
198 * Updated SAML error handling to display additional error detail. ([#3731](https://github.com/BookStackApp/BookStack/issues/3731))
199 * Updated translations with latest Crowdin updates. ([#3710](https://github.com/BookStackApp/BookStack/pull/3710))
200 * Updated locale setting to help apply right locale on Windows. ([#3650](https://github.com/BookStackApp/BookStack/issues/3650))
201
202 ----
203
204 <span style="font-size: 0.8em;opacity:0.9;">Header Image Credits: <span>Photo by <a href="https://danb.me">Dan Brown</a>
205   </span></span>