§
WèÄjs ã óô — d dl Z d dlZd dlZd dlZd dlmZ d dlmZmZ d dl m
Z
d dlmZ d dlm
Z
d dlmZmZ d dlmZ d d lmZ d
dlmZ d
dlmZ d
d
lmZmZ d
dlmZ d
dlm Z defd„Z! G d„ d¦ « Z"dS )é N)ÚAny)ÚSchemaÚSchemaError)Úwraps)ÚCallable)Úget_user_auth_key)ÚuserdomainsÚcpusers)Ú
find_wp_paths)Úgettexté )Ú
get_client)Úpullzone_info_schema)ÚXRayAPIErrorÚ XRayError)Ú timestamp)Úget_xray_exec_userÚfuncc ó€ ‡ ‡— dt dt dt dt fd„Št ‰ ¦ « ˆ ˆfd„¦ « }|S )NÚ
account_idÚdomainÚwebsiteÚusernamec óR — t ¦ « }|r|}nU|sSt t ¦ « ¦ « D ]}t |¦ « }|| k r|} nŒt t d¦ « ¦ « ‚t
|¦ « }|D ]’}|d | dd¦ « dd¦ « k r\t t |d ¦ « ¦ « } | d¦ « r
|dd… n|}
|
| vrt d | › �¦ « ‚ dS Œ“t t d
¦ « ¦ « ‚)z1
If user owns domain and website
z;Passed account_id does not belong to any user on the serverr zhttps://Ú zhttp://é ú/Nz(Passed website is not found, all sites: z5Passed domain cannot be found in list of user domains)
r Úlistr
r r Ú_r Úreplacer Ú
startswith)r r r r Ú
proxy_userÚuserÚauth_keyÚdomains_docroot_listÚdomain_itemÚwordpress_listÚwp_sites úU/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/adviser/awp_provision_api.pyÚvalidatez%validate_users_data.