The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/models/accountSettings.js

33 lines
594 B

AccountSettings = new Mongo.Collection('accountSettings');
AccountSettings.attachSchema(new SimpleSchema({
_id: {
type: String,
},
booleanValue: {
type: Boolean,
optional: true,
},
sort: {
type: Number,
decimal: true,
},
}));
AccountSettings.allow({
update(userId) {
const user = Users.findOne(userId);
return user && user.isAdmin;
},
});
if (Meteor.isServer) {
Meteor.startup(() => {
AccountSettings.upsert({ _id: 'accounts-allowEmailChange' }, {
$setOnInsert: {
booleanValue: false,
sort: 0,
},
});
});
}