consterror=newMeteor.Error('LDAP-login-error','LDAP Authentication succeded, there is no email to create an account. Have you tried setting your Default Domain in LDAP Settings?');
consterror=newMeteor.Error('LDAP-login-error','LDAP Authentication succeeded, there is no email to create an account. Have you tried setting your Default Domain in LDAP Settings?');
logger.error(error);
throwerror;
}
@ -267,7 +455,7 @@ export function addLdapUser(ldapUser, username, password) {
returnerror;
}
syncUserData(userObject,ldapUser);
syncUserData(userObject,ldapUser,ldap);
return{
userId:userObject._id,
@ -282,6 +470,9 @@ export function importNewUsers(ldap) {
if(!ldap){
ldap=newLDAP();
}
if(!ldap.connected){
ldap.connectSync();
}
@ -319,12 +510,12 @@ export function importNewUsers(ldap) {
"LDAP_Sync_User_Data_Description":"Keep user data in sync with server on **login** or on **background sync** (eg: name, email).",
"LDAP_Sync_User_Data_FieldMap":"User Data Field Map",
"LDAP_Sync_User_Data_FieldMap_Description":"Configure how user account fields (like email) are populated from a record in LDAP (once found). <br/>As an example, `{\"cn\":\"name\", \"mail\":\"email\"}` will choose a person's human readable name from the cn attribute, and their email from the mail attribute. Additionally it is possible to use variables, for example: `{ \"#{givenName} #{sn}\": \"name\", \"mail\": \"email\" }` uses a combination of the user's first name and last name for the rocket chat `name` field.<br/>Available fields in Rocket.Chat: `name`, `email` and `customFields`.",
"LDAP_Sync_User_Data_Groups":"Sync LDAP Groups",
"LDAP_Sync_User_Data_Groups_AutoChannels":"Auto Sync LDAP Groups to Channels",
"LDAP_Sync_User_Data_Groups_AutoChannels_Admin_Description":"When channels are auto-created that do not exist during a sync, this user will automatically become the admin for the channel.",
"LDAP_Sync_User_Data_Groups_AutoChannels_Description":"Enable this feature to automatically add users to a channel based on their LDAP group. If you would like to also remove users from a channel, see the option below about auto removing users.",
"LDAP_Sync_User_Data_Groups_AutoChannelsMap":"LDAP Group Channel Map",
"LDAP_Sync_User_Data_Groups_AutoChannelsMap_Default":"// Enable Auto Sync LDAP Groups to Channels above",
"LDAP_Sync_User_Data_Groups_AutoChannelsMap_Description":"Map LDAP groups to Rocket.Chat channels. <br/>As an example, `{\"employee\":\"general\"}` will add any user in the LDAP group employee, to the general channel.",
"LDAP_Sync_User_Data_Groups_AutoRemove":"Auto Remove User Roles",
"LDAP_Sync_User_Data_Groups_AutoRemove_Description":"**Attention**: Enabling this will automatically remove users from a role if they are not assigned in LDAP! This will only remove roles automatically that are set under the user data group map below.",
"LDAP_Sync_User_Data_Groups_BaseDN":"LDAP Group BaseDN",
"LDAP_Sync_User_Data_Groups_BaseDN_Description":"The LDAP BaseDN used to lookup users.",
"LDAP_Sync_User_Data_Groups_Enforce_AutoChannels":"Auto Remove Users from Channels",
"LDAP_Sync_User_Data_Groups_Enforce_AutoChannels_Description":"**Attention**: Enabling this will remove any users in a channel that do not have the coorosponding LDAP group! Only enable this if you know what you're doing.",
"LDAP_Sync_User_Data_Groups_Filter":"User Group Filter",
"LDAP_Sync_User_Data_Groups_Filter_Description":"The LDAP search filter used to check if a user is in a group.",
"LDAP_Sync_User_Data_GroupsMap":"User Data Group Map",
"LDAP_Sync_User_Data_GroupsMap_Description":"Map LDAP groups to Rocket.Chat user roles <br/>As an example, `{\"rocket-admin\":\"admin\", \"tech-support\":\"support\"}` will map the rocket-admin LDAP group to Rocket's \"admin\" role.",
"LDAP_Test_Connection":"Test Connection",
"LDAP_Timeout":"Timeout (ms)",
"LDAP_Timeout_Description":"How many mileseconds wait for a search result before return an error",