-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Milestone
Comments
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
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
The text was updated successfully, but these errors were encountered: