diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-10-09 21:16:47 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-10-09 21:16:47 +0300 |
commit | 3a7ae7c5f240287a4fc58eb3a321129be718d40c (patch) | |
tree | eb981308f87f296d984915a71efb5c51c24082f2 /models/users.js | |
parent | 28a01862d04654784bd6010035c3a6fe1690ba60 (diff) | |
download | wekan-3a7ae7c5f240287a4fc58eb3a321129be718d40c.tar.gz wekan-3a7ae7c5f240287a4fc58eb3a321129be718d40c.tar.bz2 wekan-3a7ae7c5f240287a4fc58eb3a321129be718d40c.zip |
Fix lint errors.
Diffstat (limited to 'models/users.js')
-rw-r--r-- | models/users.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/users.js b/models/users.js index 9a195850..f8ccb030 100644 --- a/models/users.js +++ b/models/users.js @@ -499,7 +499,7 @@ if (Meteor.isServer) { user.emails = [{ address: email, verified: true }]; const initials = user.services.oidc.fullname.match(/\b[a-zA-Z]/g).join('').toUpperCase(); user.profile = { initials, fullname: user.services.oidc.fullname }; - user['authenticationMethod'] = 'oauth2'; + user.authenticationMethod = 'oauth2'; // see if any existing user has this email address or username, otherwise create new const existingUser = Meteor.users.findOne({$or: [{'emails.address': email}, {'username':user.username}]}); @@ -512,7 +512,7 @@ if (Meteor.isServer) { existingUser.emails = user.emails; existingUser.username = user.username; existingUser.profile = user.profile; - existingUser['authenticationMethod'] = user['authenticationMethod']; + existingUser.authenticationMethod = user.authenticationMethod; Meteor.users.remove({_id: existingUser._id}); // remove existing record return existingUser; @@ -527,7 +527,7 @@ if (Meteor.isServer) { // If ldap, bypass the inviation code if the self registration isn't allowed. // TODO : pay attention if ldap field in the user model change to another content ex : ldap field to connection_type if (options.ldap || !disableRegistration) { - user['authenticationMethod'] = 'ldap'; + user.authenticationMethod = 'ldap'; return user; } @@ -647,7 +647,7 @@ if (Meteor.isServer) { const disableRegistration = Settings.findOne().disableRegistration; // If ldap, bypass the inviation code if the self registration isn't allowed. // TODO : pay attention if ldap field in the user model change to another content ex : ldap field to connection_type - if (doc['authenticationMethod'] !== 'ldap' && disableRegistration) { + if (doc.authenticationMethod !== 'ldap' && disableRegistration) { const invitationCode = InvitationCodes.findOne({code: doc.profile.icode, valid: true}); if (!invitationCode) { throw new Meteor.Error('error-invitation-code-not-exist'); |