| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/erp/offboarding/__pycache__/ |
Upload File : |
o
hͦh� � @ s� d Z ddlmZ ddlmZmZ ddlmZ ddlm Z ddl
mZmZm
Z
mZ e ddd ��Ze d
d� �Ze dd
� �Ze dd� �ZdS )zq
offboarding/decorators.py
This module is used to write custom authentication decorators for offboarding module
� )�messages)�HttpResponse�HttpResponseRedirect)�render)�decorator_with_arguments)�Offboarding�OffboardingGeneralSetting�OffboardingStage�OffboardingTaskFc s � ��fdd�}|S )Nc s� | j j}| j ���s'�s'tjj|d��� tjj|d��� B tjj|d��� B r2� | g|�R i |��S | j �
dd�}d|� d�}d}|| j �� v rMt| d�S t
|�S )N��managers�HTTP_REFERER�/� <script>window.location.href = "�
"</script>�HTTP_HX_REQUEST�decorator_404.html)�user�employee_get�has_permr �objects�filter�existsr r
�META�get�keysr r ��request�args�kwargs�employee�previous_url�script�key��function�offboarding_employee_can_enter�perm� �&/var/www/erp/offboarding/decorators.py� _function s$
�����
z(any_manager_can_enter.<locals>._functionr( )r% r'