a
    }h                     @   s   d dl mZ d dlmZ d dlmZ d dlmZm	Z	m
Z
mZmZ G dd deZG dd deZG d	d
 d
eZG dd deZG dd deZG dd deZG dd deZeedd e D dd dZdS )    )gettext_lazy)registered_roles)BaseRole)GRANTTRUE
GRANT_NINPFALSE_NITRUE_NIc                   @   s"   e Zd ZdZdZdZeedZdS )BaseUserRoleFT)Zuserprofile__read__ownZuserprofile__update__ownN)	__name__
__module____qualname__selectable_rolepropagate_permissionsgrant_all_permissionsr   r   available_permissions r   r   @C:\Users\Administrator\Downloads\futplus_django\futplus\roles.pyr
   	   s   r
   c                   @   s2   e Zd ZdZedZedZdZdZe	e	dZ
dS )ManagementManagerRoleZmanagement_manager_rolezManagement Managerz	M.ManagerFT)Zis_managementis_management_managerN)r   r   r   old_role_name_verbose_nameverbose_name_shortr   r   r   r   r   r   r   r   r      s   r   c                2   @   s   e Zd ZdZedZedZdZee	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e
e	e	e
e	ee	e	e	e	e	e	e	e	e	e	e	e	e	e	e	d1ZdS )ManagementStaffRoleZmanagement_staff_rolezManagement StaffzM.StaffF)1Zis_management_staffZuser__createZ
user__readZuser__updateZuser_role__updateZuser_permission__update__allZuser_permission__update__relZuser_permission__update__ownZsbc_workers__read__allZsbc_workers__read__relZsbc_workers__read__ownZsbc_workers_log__read__allZsbc_workers_log__read__relZsbc_workers_log__read__ownZsbc_menu__readsniper_workers__read__allsniper_workers__read__relsniper_workers__read__ownZdischarge__read__allZtrade_workers__read__allZtrade_workers__read__relZtrade_workers__read__ownZtrade_menu__readZ(account_check_healthy_workers__read__allZ(account_check_healthy_workers__read__relZ(account_check_healthy_workers__read__ownZ account_check_healthy_menu__readZproxy_menu__readZmule_accounts__read__allmule_accounts__createZfifa_account_menu__readZ	pcs__readZfifa_proxy__deleteZdashboard_export_listsZconsole_stock_mapZconsole_log__read__allZplayer_card_menuZconsole_menuZmanager_commandsZfifa_account__read__allZfifa_account__update__allZconsole__read__allZconsole__update__allZsbc_worker__read__allZsbc_worker__update__allZconsole_report__read__allZconsoles_command__create__allZtransactions__readZinvestor_log__read__allN)r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   &   sl   r   c                   @   s(   e Zd ZdZedZedZdeiZdS )SpecialUserRoleZspecial_user_rolezSpecial UserzS.UserZis_special_userN)	r   r   r   r   r   r   r   r   r   r   r   r   r   r   u   s
   r   c                   @   sF   e Zd ZdZedZedZeeeeeeeeeeeeeee	e	dZ
dS )InvestorRoleZinvestor_roleZInvestor)is_investorconsole_log__read__relconsole_log__read__ownfifa_account__createfifa_account__read__relfifa_account__read__ownfifa_account__update__relfifa_account__update__ownZconsole__read__relZconsole__read__ownZconsole__update__relZconsole__update__ownconsole_report__read__relconsole_report__read__ownZinvestor_log__read__relZinvestor_log__read__ownN)r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r       s(   r    c                   @   s\   e Zd ZdZedZedZeeeeeeeeeeeeeeeeeeeeeeeeeeedZ	dS )OperatorRoleZoperator_roleOperator)is_operatorr"   r#   r$   r%   r&   r'   r(   Zsbc_worker__read__relZsbc_worker__read__ownZsbc_worker__update__relZsbc_worker__update__ownr)   r*   Zconsoles_command__create__relZconsoles_command__create__ownZmule_accounts__read__relZmule_accounts__read__ownr   utilsZconsoles_powerZadd_remove_accountZadd_auto_sbcZcommand_menuZoperator_commandsZdaily_invest_trade__read__allZ daily_credit_generate__read__allN
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r+      s>   r+   c                   @   s.   e Zd ZdZedZedZeeeedZ	dS )SniperOperatorRoleZsniper_operator_rolezSniper Operator)Zis_sniper_operatorr   r   r   Nr/   r   r   r   r   r0      s   r0   c                 c   s   | ]}t |d dr|V  qdS )r   FN)getattr).0roler   r   r   	<genexpr>       r4   c                 C   s   t | dd|  fS )Norderi'  )r1   get_name)r3   r   r   r   <lambda>   r5   r8   )keyN)django.utils.translationr   r   Zrolepermissions.rolesr   Zcustomrolepermissions.rolesr   Zcustomrolepermissions.statesr   r   r   r   r	   r
   r   r   r   r    r+   r0   listsortedvaluesZAnyRoler   r   r   r   <module>   s   O 2