[doc] add validate_uniqueness section

This commit is contained in:
Laurent Peuch 2017-08-12 13:57:33 +02:00
parent 5bb9e1e6ab
commit 66b4ef97a9

View file

@ -243,3 +243,23 @@ This is done this way:
auth.update('uid=some_username,ou=users', {'attribute': 'new_value', ...}) auth.update('uid=some_username,ou=users', {'attribute': 'new_value', ...})
Refer to the user schema to know which attributes you can modify. Refer to the user schema to know which attributes you can modify.
Validate uniqueness
===================
There is a method to validate the uniquess of some entry that is used during
user creation. I haven't used it and I'm not sure on how it work.
Here is how it's used (I don't understand why a path is not provided):
::
# Validate uniqueness of username and mail in LDAP
auth.validate_uniqueness({
'uid': username,
'mail': mail
})
And here is its docstring:
.. automethod:: moulinette.authenticators.ldap.Authenticator.update