Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup & separate res.locals #124

Closed
ErisDS opened this issue Jun 9, 2013 · 0 comments
Closed

Cleanup & separate res.locals #124

ErisDS opened this issue Jun 9, 2013 · 0 comments
Assignees
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Jun 9, 2013

res.locals needs to be cleaned up and separated into backend/admin and frontend/theme variables.

Admin should and does have access to properties that shouldn't be made available to every frontend template, and vice versa. Most importantly, I don't think that the frontend should get flashes from the admin?

ErisDS added a commit to ErisDS/Ghost that referenced this issue Jun 17, 2013
- ghost.js - globals/globalConfig has become settings / settingsCache to make it clearer
- app.js - the ghostGlobals local cache is gone, and the use of res.locals has been cleaned up and simplified, although this needs to be properly split into frontend and admin locals (to be finished in TryGhost#124)
- frontend/index.js - doesn't need to be passed globals and nav properties as res.locals does this for us
@ghost ghost assigned ErisDS Jun 25, 2013
ErisDS added a commit that referenced this issue Jun 25, 2013
- closes #124
- added new middleware to detect if a route should be admin or not
- updated ghostLocals to use this and return different locals
- updated ghost.js#initTheme to use the same test
@ErisDS ErisDS closed this as completed Jun 25, 2013
morficus pushed a commit to morficus/Ghost that referenced this issue Sep 4, 2014
- ghost.js - globals/globalConfig has become settings / settingsCache to make it clearer
- app.js - the ghostGlobals local cache is gone, and the use of res.locals has been cleaned up and simplified, although this needs to be properly split into frontend and admin locals (to be finished in TryGhost#124)
- frontend/index.js - doesn't need to be passed globals and nav properties as res.locals does this for us
morficus pushed a commit to morficus/Ghost that referenced this issue Sep 4, 2014
- closes TryGhost#124
- added new middleware to detect if a route should be admin or not
- updated ghostLocals to use this and return different locals
- updated ghost.js#initTheme to use the same test
daniellockyer pushed a commit that referenced this issue Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant