コード例 #1
0
def user_pre_delete(**kwargs):
    """
    Delete users's LDAP account.
    """
    user = kwargs['instance']
    ldap_account = get_ldap_account_safely(user)
    if ldap_account:
        delete_ldap_account(ldap_account)
コード例 #2
0
ファイル: signals.py プロジェクト: nadineproject/nadine
def user_pre_delete(**kwargs):
    """
    Delete users's LDAP account.
    """
    user = kwargs['instance']
    ldap_account = get_ldap_account_safely(user)
    if ldap_account:
        delete_ldap_account(ldap_account)
コード例 #3
0
 def clean_up_accounts(self):
     to_delete = LDAPAccountStatus.objects.filter(user=None)
     for ldap_account in to_delete:
         self.stdout.write("Deleting orphaned account '{}'...".format(
             ldap_account.ldap_dn))
         delete_ldap_account(ldap_account)
コード例 #4
0
ファイル: syncldapusers.py プロジェクト: nadineproject/nadine
 def clean_up_accounts(self):
     to_delete = LDAPAccountStatus.objects.filter(user=None)
     for ldap_account in to_delete:
         self.stdout.write("Deleting orphaned account '{}'...".format(ldap_account.ldap_dn))
         delete_ldap_account(ldap_account)