|
@@ -35,7 +35,7 @@ module.exports = function(crowi) {
|
|
|
userEvent.on('activated', userEvent.onActivated);
|
|
userEvent.on('activated', userEvent.onActivated);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const editorSchema = new mongoose.Schema({
|
|
|
|
|
|
|
+ const defaultSettingsForNewPageSchema = new mongoose.Schema({
|
|
|
isTextLintEnable: { type: Boolean, default: true },
|
|
isTextLintEnable: { type: Boolean, default: true },
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -70,7 +70,7 @@ module.exports = function(crowi) {
|
|
|
lastLoginAt: { type: Date },
|
|
lastLoginAt: { type: Date },
|
|
|
admin: { type: Boolean, default: 0, index: true },
|
|
admin: { type: Boolean, default: 0, index: true },
|
|
|
isInvitationEmailSended: { type: Boolean, default: false },
|
|
isInvitationEmailSended: { type: Boolean, default: false },
|
|
|
- editorSettings: editorSchema,
|
|
|
|
|
|
|
+ defaultSettingsForNewPage: defaultSettingsForNewPageSchema,
|
|
|
}, {
|
|
}, {
|
|
|
toObject: {
|
|
toObject: {
|
|
|
transform: (doc, ret, opt) => {
|
|
transform: (doc, ret, opt) => {
|
|
@@ -698,8 +698,8 @@ module.exports = function(crowi) {
|
|
|
user.save();
|
|
user.save();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- userSchema.methods.updateEditorSettings = async function(editorSettings) {
|
|
|
|
|
- this.editorSettings = editorSettings;
|
|
|
|
|
|
|
+ userSchema.methods.updatedefaultSettingsForNewPage = async function(defaultSettingsForNewPage) {
|
|
|
|
|
+ this.defaultSettingsForNewPage = defaultSettingsForNewPage;
|
|
|
const userData = await this.save();
|
|
const userData = await this.save();
|
|
|
return userData;
|
|
return userData;
|
|
|
};
|
|
};
|