Merge pull request #8707 from overleaf/ta-user-context-fix

Fix User Context Attributes

GitOrigin-RevId: 1fed088785d21e9ec51f3f541487c2fa0e1d0111
This commit is contained in:
Timothée Alby 2022-07-07 10:00:50 +02:00 committed by Copybot
parent 8f41431719
commit b3dc3808c7
2 changed files with 5 additions and 1 deletions

View file

@ -72,12 +72,14 @@ async function settingsPage(req, res) {
res.render('user/settings-react', {
title: 'account_settings',
user: {
id: user.id,
id: user._id,
isAdmin: user.isAdmin,
email: user.email,
allowedFreeTrial: user.allowedFreeTrial,
first_name: user.first_name,
last_name: user.last_name,
alphaProgram: user.alphaProgram,
betaProgram: user.betaProgram,
features: {
dropbox: user.features.dropbox,
github: user.features.github,

View file

@ -13,6 +13,8 @@ UserContext.Provider.propTypes = {
allowedFreeTrial: PropTypes.boolean,
first_name: PropTypes.string,
last_name: PropTypes.string,
alphaProgram: PropTypes.boolean,
betaProgram: PropTypes.boolean,
features: PropTypes.shape({
dropbox: PropTypes.boolean,
github: PropTypes.boolean,