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

[ADD] users_ldap_push #287

Merged
merged 1 commit into from
Feb 3, 2016
Merged

Conversation

hbrunn
Copy link
Member

@hbrunn hbrunn commented Nov 2, 2015

Push users to LDAP

This module was written in order to use Odoo as a frontend for creating LDAP
entries by creating user records. Updates to the user record will be propagated
to the linked LDAP entry afterwards.

When users change their passwords, they will be updated in the LDAP directory
too.

Configuration

On the LDAP parameters of your company, check Create ldap entry in order to
activate this functionality. Be sure to configure a bind DN that has
appropriate permissions to create and modify entries.

Fill in the object classes newly created entries should contain, separated by
colons. Those classes will determine which mappings from Odoo fields to LDAP
attributes you need. This is highly dependent on your LDAP setup.

For a standard slapd setup, you might want to use object classes
inetOrgPerson,shadowAccount and the following mapping:

========== ============== ==
Odoo field LDAP attribute DN
========== ============== ==
Login userid X
Name cn
Name sn
========== ============== ==

Matching is done by the new field ldap_entry_dn, so after installing this
module, you'll probably want to set this field. The module will write it when
a user logs in via Odoo.

Usage

When you create or update users, their corresponding LDAP entries will be
updated too.

@moylop260
Copy link
Contributor

👍 (without test)

'attribute': 'userid',
'use_for_dn': True,
}),
])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason why you're not defining a dedicated default method and passing it as the default kwarg to the field?

@hbrunn
Copy link
Member Author

hbrunn commented Nov 25, 2015

@gurneyalex thanks for the review, most points fixed, the remaining points left to discussion

@gurneyalex
Copy link
Member

👍

attribute = fields.Char('LDAP attribute', required=True)
use_for_dn = fields.Boolean('DN')
ldap_id = fields.Many2one(
'res.company.ldap', string='LDAP comfiguration', required=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: configuration

@hbrunn
Copy link
Member Author

hbrunn commented Feb 3, 2016

@StefanRijnhart thanks, all points taken

@StefanRijnhart
Copy link
Member

Thanks for the update 👍

StefanRijnhart added a commit that referenced this pull request Feb 3, 2016
@StefanRijnhart StefanRijnhart merged commit a723a65 into OCA:8.0 Feb 3, 2016
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.

None yet

5 participants