From 66b4ef97a93ec1860d5b698aedca5c2be26e6dd3 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 12 Aug 2017 13:57:33 +0200 Subject: [PATCH] [doc] add validate_uniqueness section --- doc/ldap.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/ldap.rst b/doc/ldap.rst index 11ce45c2..b446400d 100644 --- a/doc/ldap.rst +++ b/doc/ldap.rst @@ -243,3 +243,23 @@ This is done this way: auth.update('uid=some_username,ou=users', {'attribute': 'new_value', ...}) 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