mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[doc] document ldap removal
This commit is contained in:
parent
77743bd02f
commit
7ef42eb3aa
1 changed files with 24 additions and 0 deletions
24
doc/ldap.rst
24
doc/ldap.rst
|
@ -348,3 +348,27 @@ Here is how it's used (I don't understand why a path is not provided):
|
||||||
And here is its docstring:
|
And here is its docstring:
|
||||||
|
|
||||||
.. automethod:: moulinette.authenticators.ldap.Authenticator.update
|
.. automethod:: moulinette.authenticators.ldap.Authenticator.update
|
||||||
|
|
||||||
|
Remove entries from LDAP
|
||||||
|
========================
|
||||||
|
|
||||||
|
Remove entries from LDAP is very simple, quite close to adding stuff except you don't need to specify the attributes dict, you just need to entrie path:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
auth.remove(path)
|
||||||
|
|
||||||
|
Here how it looks like for domain and user:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
# domain
|
||||||
|
auth.remove('virtualdomain=%s,ou=domains' % domain)
|
||||||
|
|
||||||
|
# user
|
||||||
|
auth.remove('uid=%s,ou=users' % username)
|
||||||
|
|
||||||
|
:file:`auth.remove` returns something that evaluate to False when it fails
|
||||||
|
(:file:`None` ?) so you need to check it returns code.
|
||||||
|
|
||||||
|
.. automethod:: moulinette.authenticators.ldap.Authenticator.remove
|
||||||
|
|
Loading…
Add table
Reference in a new issue