mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
506a0c3e9e
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 |
||
---|---|---|
.. | ||
adapters | ||
admin | ||
api | ||
apps | ||
auth | ||
blog | ||
config | ||
controllers/frontend | ||
data | ||
events | ||
helpers | ||
middleware | ||
models | ||
permissions | ||
public | ||
settings | ||
themes | ||
translations | ||
utils | ||
views | ||
analytics-events.js | ||
app.js | ||
errors.js | ||
filters.js | ||
ghost-server.js | ||
i18n.js | ||
index.js | ||
logging.js | ||
overrides.js | ||
update-check.js |