Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate LDAP into RocketChat #2

Merged
merged 3 commits into from
Jul 16, 2015
Merged

Integrate LDAP into RocketChat #2

merged 3 commits into from
Jul 16, 2015

Conversation

rwakida
Copy link

@rwakida rwakida commented Jul 16, 2015

Integrated previous project code related to LDAP access (login, get values) with RocketChat. You should be able to login using ldap username/password values and participate in all RocketChat channels and direct messaging.

Reid Wakida and others added 3 commits July 15, 2015 00:50
- Uses proprietary LDAP classes that retrieve user data from LDAP.
Eventually need to replace with rocketchat-ldap code once it matures.
- Registers login handler that authenticates againist LDAP
- Import defeault settings that contains LDAP configuration.
RocketChat adds new users to the GENERAL channel as part of the
registration process (when setting username).  Unfortunately, we pre-load
the users from LDAP and do not allow them to set their username which
skips the code that adds them to GENERAL channel.  Thus, we need to add
them to the GENERAL channel when we pre-load the users.  Also, we can't
re-use RocketChat's code because their method assumes that a user is
logged in, but our code is run at startup and has no user.
login.

User information is pre-loaded at startup and refreshed at login.
However, the upsert method overwrote the user object instead of
individual fields.  This was evident after the intial login.  The initial
login correctly asked for an avatar and set a corresponding field.
However, on subsequent logins, the user was prompted for an avatar again
because the ldap values overwrote the user and deleted the avatar field.
@bbrockman bbrockman changed the title Feature/jedis 598 Integrate LDAP into RocketChat Jul 16, 2015
@bbrockman bbrockman added this to the Sprint 1 milestone Jul 16, 2015
@douglasrapp
Copy link

Code looks good, though I didn't really go over the stuff that was copy-pasted from the old chat app. Maybe in the future we can put the code for adding users to the "General" channel into a separate method so that we don't duplicate between the "setUsername" method and the "addUsersToRoom" function.

Ran the app and tested for a while. I can log in with any of our LDAP users, and looking at the users collection, it looks like all of the attributes are there, including the security permission labels.

I approve the pull request.

rwakida added a commit that referenced this pull request Jul 16, 2015
Integrate LDAP into RocketChat
@rwakida rwakida merged commit 3ddb8d0 into master Jul 16, 2015
@rwakida rwakida added Done and removed In Review labels Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants