Ghost/core/server
Katharina Irrgang 506a0c3e9e 🔥 Removed certain fields from public user response (#9069)
no issue 

* Comment current state of toJSON for user model

- currently the user model does not return the email if the context is app/external/public OR if there is no context object at all
- i am not 100% sure why if there is no context we should not return the email address
- i think no context means internal access
- maybe change this condition cc @ErisDS

* Extend our access rules plugin

- we already have a instance method to determine which context is used
- this relies on passing options into `.forge` - but we almost never pass the context into the forge call
  - added @TODO
- provide another static method to determine the context based on the options object passed from outside

* Use the new static function for existing code

* Add comment where the external context is used

* Remove certain fields from a public request (User model only)

* Tests: support `checkResponse` for a public request

- start with an optional option pattern
- i would love to get rid of checkResponse('user', null, null, null)
- still support old style for now
- a resoure can define the default response fields and public response fields

* Tests: adapt public api test

* Tests: adapt api user test

- use new option pattern for `checkResponse`
- eww null, null, null, null....

* Revert the usage of the access rules plugin
2017-09-28 14:00:52 +01:00
..
adapters 🐛 Fixed post scheduling (#8976) 2017-09-05 19:23:11 +01:00
admin API express app routing & middleware improvements (#8883) 2017-08-17 17:52:58 +07:00
api Fixed wrong handling of formats param (#9078) 2017-09-28 13:38:32 +01:00
apps Misc cleanup & consistency amends (#9002) 2017-09-12 17:31:14 +02:00
auth Improved debug logs for auth utils (#9015) 2017-09-18 16:23:47 +01:00
blog Allow Upload/Download of redirects.json (#9029) 2017-09-21 16:01:03 +01:00
config 🐛 Fixed redirects upload for various browsers/systems (#9042) 2017-09-22 21:57:43 +02:00
controllers/frontend Misc cleanup & consistency amends (#9002) 2017-09-12 17:31:14 +02:00
data Allow Upload/Download of redirects.json (#9029) 2017-09-21 16:01:03 +01:00
events post-scheduling 2016-06-14 10:52:13 +02:00
helpers ghost_head improvements (#8983) 2017-09-07 12:59:02 +02:00
mail Improved log output for welcome email error (#9016) 2017-09-19 14:24:20 +01:00
middleware Allow Upload/Download of redirects.json (#9029) 2017-09-21 16:01:03 +01:00
models 🔥 Removed certain fields from public user response (#9069) 2017-09-28 14:00:52 +01:00
permissions 🔥 Removed certain fields from public user response (#9069) 2017-09-28 14:00:52 +01:00
public 🛠 🙈 Rename ghost-url.js to ghost-sdk.js (#8767) 2017-07-28 18:23:32 +04:00
settings Used ghost-ignition.debug, removed debug dep (#8881) 2017-08-15 18:29:27 +07:00
themes Used ghost-ignition.debug, removed debug dep (#8881) 2017-08-15 18:29:27 +07:00
translations 🐛 Fixed redirects upload for various browsers/systems (#9042) 2017-09-22 21:57:43 +02:00
utils Removed markdown-it-named-headers and unused string deps (#8994) 2017-09-25 16:36:34 +02:00
views 🎨 gscan 1.1.0 & optimisations 2017-06-06 13:07:50 +07:00
analytics-events.js Add segment analytics for blog data (#8912) 2017-08-22 12:23:23 +01:00
app.js API express app routing & middleware improvements (#8883) 2017-08-17 17:52:58 +07:00
errors.js 🐛 Added 409 UpdateCollisionError for the editor (#8899) 2017-08-15 12:06:40 +02:00
filters.js Misc grunt /dev updates 2015-05-28 20:25:14 +01:00
ghost-server.js Used ghost-ignition.debug, removed debug dep (#8881) 2017-08-15 18:29:27 +07:00
i18n.js 🎨 rename language to locale and use en as default locale (#8490) 2017-05-31 16:05:49 +01:00
index.js Removed defunct Ghost OAuth code (#9014) 2017-09-18 13:01:58 +01:00
logging.js 🐛 forward missing logging config: rotation 2017-02-17 18:24:14 +01:00
overrides.js 🛠 update lodash,knex and bookshelf to latest versions 2016-09-26 10:20:55 +02:00
update-check.js 🐛 Fixed persistent upgrade notifications showing for the currently installed version (#9048) 2017-09-25 12:22:56 +01:00