Files
zulip/zerver/management/commands/query_ldap.py
Harshit Bansal b519e6594e management: Move query_ldap function to zproject/backends.py.
This will make it simpler to organize and unit-test all of our
authentication backend code.
2019-03-09 22:12:36 -08:00

16 lines
459 B
Python

from argparse import ArgumentParser
from typing import Any
from django.core.management.base import BaseCommand
from zproject.backends import query_ldap
class Command(BaseCommand):
def add_arguments(self, parser: ArgumentParser) -> None:
parser.add_argument('email', metavar='<email>', type=str,
help="email of user to query")
def handle(self, *args: Any, **options: str) -> None:
query_ldap(**options)