0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/models
Katharina Irrgang 04c60b4ce1
🐛 Fixed private blogging getting enabled when saving any setting (#10576)
no issue

- Reported here: https://forum.ghost.org/t/in-version-2-16-3-found-bug/6065/3

---

Admin Client sends false or true booleans for `is_private` key.

The settings table has two columns "key" and "value". And "value" is always type TEXT.

If you pass value=false, the db will transform this value into "0".
`settingsCache.get('is_private')` is then always true, even though the value is meant to be false.

We should add a migration in v3 and normalize all setting values to ensure consistent database values. Furthermore, we should improve the handling around settings values in general.

For now, we protect parsing values from DB, which we anyway need to transform the values into the correct data type, because we always save strings. This will protect values being stored as "false" or "1" or whatever.
2019-03-06 12:56:26 +01:00
..
base 🐛 Fixed 500 error when wrong field data was passed 2019-03-05 17:26:34 +08:00
plugins Introduced model._changed 2019-02-03 13:02:26 +01:00
relations 🐛 Fixed field filtering for /authors/:id endpoints 2019-03-05 15:18:32 +08:00
accesstoken.js Ensured consistency for event handlers in the model layer 2019-02-07 11:02:35 +01:00
action.js Added model implementation for actions 2019-02-06 21:36:09 +01:00
api-key.js Added migration to insert builtin Zapier integration (#10500) 2019-02-15 14:48:21 +00:00
app-field.js
app-setting.js
app.js Updated permittedOptions to correctly call super 2018-09-21 12:15:29 +02:00
author.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
client-trusted-domain.js
client.js Updated permittedOptions to correctly call super 2018-09-21 12:15:29 +02:00
index.js Added model implementation for actions 2019-02-06 21:36:09 +01:00
integration.js Added migration to insert builtin Zapier integration (#10500) 2019-02-15 14:48:21 +00:00
invite.js Updated permissible methods for hasApiKeyPermissions (#9970) 2019-01-18 13:39:53 +01:00
member.js Added members related db changes and models 2018-12-11 11:53:55 +07:00
mobiledoc-revision.js Added mobiledoc revisions functionality 2018-10-09 15:31:09 +02:00
permission.js
post.js 🐛 Fixed plaintext field not being cleared when post body is removed 2019-03-04 14:03:44 +00:00
refreshtoken.js Switched to eslint-plugin-ghost (#9835) 2018-09-17 20:49:30 +02:00
role.js Updated permissible methods for hasApiKeyPermissions (#9970) 2019-01-18 13:39:53 +01:00
session.js Removed user_id constraint when upserting session (#10085) 2018-10-30 16:15:48 +07:00
settings.js 🐛 Fixed private blogging getting enabled when saving any setting (#10576) 2019-03-06 12:56:26 +01:00
subscriber.js Ensured consistency for event handlers in the model layer 2019-02-07 11:02:35 +01:00
tag-public.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
tag.js 🐛 Fixed field filtering for /tags/:id endpoints 2019-03-05 13:17:38 +08:00
user.js 🐛 Fixed email address not being returned with admin api key authentication 2019-03-06 10:48:21 +01:00
webhook.js Ensured consistency for event handlers in the model layer 2019-02-07 11:02:35 +01:00