add new task delete_ldap_group

This commit is contained in:
Jan Dittberner 2014-12-29 15:22:52 +01:00
parent f2b8af39a0
commit 9b4bef0050
3 changed files with 16 additions and 1 deletions

View file

@ -1,6 +1,8 @@
Changelog Changelog
========= =========
* :feature:`-` add new task :py:func:`osusers.tasks.delete_ldap_group` (needs
gvaldap >= 0.2.0 on the LDAP side)
* :feature:`-` add a `customer` field to :py:class:`osusers.models.User` * :feature:`-` add a `customer` field to :py:class:`osusers.models.User`
* :feature:`-` allow empty password input in * :feature:`-` allow empty password input in
:py:class:`osusers.admin.UserCreationForm` to allow generated passwords for :py:class:`osusers.admin.UserCreationForm` to allow generated passwords for

View file

@ -143,6 +143,7 @@ provides some functionality that is common to all gnuviechadmin subprojects.
.. autotask:: osusers.tasks.delete_file_mail_userdir .. autotask:: osusers.tasks.delete_file_mail_userdir
.. autotask:: osusers.tasks.delete_file_mailbox .. autotask:: osusers.tasks.delete_file_mailbox
.. autotask:: osusers.tasks.delete_file_sftp_userdir .. autotask:: osusers.tasks.delete_file_sftp_userdir
.. autotask:: osusers.tasks.delete_ldap_group
.. autotask:: osusers.tasks.delete_ldap_group_if_empty .. autotask:: osusers.tasks.delete_ldap_group_if_empty
.. autotask:: osusers.tasks.delete_ldap_user .. autotask:: osusers.tasks.delete_ldap_user
.. autotask:: osusers.tasks.remove_ldap_user_from_group .. autotask:: osusers.tasks.remove_ldap_user_from_group

View file

@ -98,7 +98,19 @@ def delete_ldap_user(username):
@shared_task @shared_task
def delete_ldap_group_if_empty(groupname): def delete_ldap_group_if_empty(groupname):
""" """
This task deletes the given group. This task deletes the given group if it is empty.
:param str groupname: the group name
:return: True if the user has been deleted, False otherwise
:rtype: boolean
"""
@shared_task
def delete_ldap_group(groupname):
"""
This taks deletes the given group.
:param str groupname: the group name :param str groupname: the group name
:return: True if the user has been deleted, False otherwise :return: True if the user has been deleted, False otherwise