Fix crash in getConfig
This commit is contained in:
@@ -144,8 +144,7 @@ async function getConfig() {
|
||||
const release = safe.fs.readFileSync('/etc/lsb-release', 'utf-8');
|
||||
if (release === null) throw new BoxError(BoxError.FS_ERROR, safe.error.message);
|
||||
const ubuntuVersion = release.match(/DISTRIB_DESCRIPTION="(.*)"/)[1];
|
||||
|
||||
const allSettings = await settings.list();
|
||||
const profileConfig = await users.getProfileConfig();
|
||||
|
||||
// be picky about what we send out here since this is sent for 'normal' users as well
|
||||
return {
|
||||
@@ -161,8 +160,8 @@ async function getConfig() {
|
||||
cloudronName: await branding.getCloudronName(),
|
||||
footer: await branding.renderFooter(),
|
||||
features: appstore.getFeatures(),
|
||||
profileLocked: allSettings[settings.PROFILE_CONFIG_KEY].lockUserProfiles,
|
||||
mandatory2FA: allSettings[settings.PROFILE_CONFIG_KEY].mandatory2FA,
|
||||
profileLocked: profileConfig.lockUserProfiles,
|
||||
mandatory2FA: profileConfig.mandatory2FA,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user