function defineLdapSetting(sequelize, DataTypes) { const LdapSetting = sequelize.define('LdapSetting', { enabled: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, }, url: { type: DataTypes.STRING, allowNull: false, defaultValue: '', }, bindDn: { type: DataTypes.STRING, allowNull: false, defaultValue: '', }, bindCredentials: { type: DataTypes.STRING, allowNull: false, defaultValue: '', }, searchBase: { type: DataTypes.STRING, allowNull: false, defaultValue: '', }, // {{username}} is replaced with the value typed in the sign-in form. searchFilter: { type: DataTypes.STRING, allowNull: false, defaultValue: '(mail={{username}})', }, emailAttribute: { type: DataTypes.STRING, allowNull: false, defaultValue: 'mail', }, usernameAttribute: { type: DataTypes.STRING, allowNull: false, defaultValue: 'cn', }, }); return LdapSetting; } export default defineLdapSetting;