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

ldap: Add support for syncing custom profile fields from LDAP #10976

Closed
1 task done
timabbott opened this issue Dec 6, 2018 · 4 comments
Closed
1 task done

ldap: Add support for syncing custom profile fields from LDAP #10976

timabbott opened this issue Dec 6, 2018 · 4 comments

Comments

@timabbott
Copy link
Sponsor Member

timabbott commented Dec 6, 2018

This shouldn't be too hard to develop and test; basically, we'd want to:

  • For, review https://zulip.readthedocs.io/en/latest/subsystems/auth.html#testing-ldap-in-development for how to do LDAP testing in development.
  • Update our generate_dev_ldap_dir function's mock LDAP directories to include values for some custom profile data fields (e.g. birthday would be a good choice).
  • Add support for AUTH_LDAP_USER_ATTR_MAP containing CustomProfileFields, maybe spelled as custom_profile_field__birthday: "birthday",. To make this work, we'd need to add a _populate_user method in ZulipLDAPBackendBase in zproject/backends.py (overriding the default from django-auth-ldap (/srv/zulip-py3-venv/lib/python3.5/site-packages/django_auth_ldap/backend.py), though the it should call super() to get the built-in code to run). That should ensure that both manage.py sync_ldap_data and user creation sync the fields over properly.
  • Document this is docs/production/authentication-methods.md.

Once this is done, two follow-ups are relevant:

  • We should do jpegPhoto LDAP Integration #286 as well, since that'll involve the same technique (but with a bit more work since we need to deal with file uploads, so we should do this first).
  • We should add options to control whether users can manually edit these custom profile fields (or perhaps just make them non-editable, since I think with this use case, that's almost certainly what you want)
@zulipbot
Copy link
Member

zulipbot commented Dec 6, 2018

Hello @zulip/server-authentication, @zulip/server-settings members, this issue was labeled with the "area: authentication", "area: settings (user)" labels, so you may want to check it out!

@HarshitOnGitHub
Copy link
Member

@zulipbot claim

@zulipbot
Copy link
Member

Hello @HarshitOnGitHub, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue?

If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 4 days.

If you've decided to work on something else, simply comment @zulipbot abandon so that someone else can claim it and continue from where you left off.

Thank you for your valuable contributions to Zulip!

@HarshitOnGitHub
Copy link
Member

@zulipbot Was busy with some college stuff, will complete this by tomorrow. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants