Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/django/contrib/auth/handlers/__pycache__/ |
Upload File : |
o ���_� � @ s4 d dl mZ d dlmZ e�� Zdd� Zdd� ZdS )� )�db)�authc C sn t �� z-ztj�|�}W n tjy Y W t �� dS w |js(W t �� dS |�|�W t �� S t �� w )z� Authenticate against Django's auth database. mod_wsgi docs specify None, True, False as return value depending on whether the user exists and authenticates. N) r � reset_queries� UserModel�_default_manager�get_by_natural_key�DoesNotExist�close_old_connections� is_active�check_password)�environ�username�password�user� r �F/usr/lib/python3/dist-packages/django/contrib/auth/handlers/modwsgi.pyr s � �r c C sz t �� z3ztj�|�}W n tjy g Y W t �� S w |js)g W t �� S dd� |j� � D �W t �� S t �� w )z* Authorize a user based on groups c S s g | ]}|j �� �qS r )�name�encode)�.0�groupr r r � <listcomp>) s z#groups_for_user.<locals>.<listcomp>) r r r r r r r r �groups�all)r r r r r r �groups_for_user s � �r N)�djangor �django.contribr �get_user_modelr r r r r r r �<module> s