Commit d298940
authored
Handled completely private posts in ContentPreparer
ref https://linear.app/ghost/issue/AP-961
When we do `if (content === post.html) content = ''` we're secretly doing the
removal of member content, for the case where the whole post is member content.
When adding extra steps to the content preparation we may do other
modifications to the content which should not be done if the post
is members only.
Instead the method to remove members content will now remove everything if a
members content marker isn't found. This means that it should never be called
on a public post, this is covered by unit tests in our Post entity.1 parent 0efe587 commit d298940
File tree
3 files changed
+15
-13
lines changed- src
- post
- publishing
3 files changed
+15
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | 242 | | |
247 | 243 | | |
248 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 183 | + | |
188 | 184 | | |
189 | 185 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| |||
0 commit comments