Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 13.58.37.241
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : mixins.cpython-36.opt-1.pyc
3

�^��@szddlZddlmZmZddlmZmZmZmZGdd�d�Z	Gdd�d�Z
Gd	d
�d
�ZGdd�d�ZGd
d�d�Z
dS)�N�)�CriteriaDescriptor�CriteriaSetDescriptor)�match_in_set�match_regex�match_range�match_regex_or_setc@s,eZdZdZed�ZdZdd�Zdd�ZdS)	�
MatchAliasz'Mixin for matching an object's aliases.�alias_regexFcCs|jdj|��dS)z+Emit log debugging info for alias matching.z(Alias: {0.alias}, regex: {0.alias_regex}N)�debug�format)�self�log�r�/usr/lib64/python3.6/mixins.py�_match_alias_debug"szMatchAlias._match_alias_debugcCs|js
dSt|j�|j|j�S)z�
        Match the alias criteria

        Parameter:
        obj     An object with an alias generator method named "aliases"
        T)�aliasr�aliasesr
)r
�objrrr�_match_alias&szMatchAlias._match_aliasN)	�__name__�
__module__�__qualname__�__doc__rrr
rrrrrrr	s
r	c@sdeZdZdZedd�ZdZedd�ZdZedd�Z	dZ
ed	d
�ZdZdZ
dZdZdd�Zd
d�ZdS)�MatchContextaL
    Mixin for matching contexts.

    Class attributes:
    user            The user to match in the context.
    user_regex      If true, regular expression matching
                    will be used on the user.
    role            The role to match in the context.
    role_regex      If true, regular expression matching
                    will be used on the role.
    type_           The type to match in the context.
    type_regex      If true, regular expression matching
                    will be used on the type.
    range_          The range to match in the context.
    range_subset    If true, the criteria will match if it
                    is a subset of the context's range.
    range_overlap   If true, the criteria will match if it
                    overlaps any of the context's range.
    range_superset  If true, the criteria will match if it
                    is a superset of the context's range.
    range_proper    If true, use proper superset/subset
                    on range matching operations.
                    No effect if not using set operations.
    �
user_regexZlookup_userF�
role_regexZlookup_role�
type_regexZlookup_typeZlookup_range)Zlookup_functioncCsD|jdj|��|jdj|��|jdj|��|jdj|��dS)z-Emit log debugging info for context matching.z'User: {0.user!r}, regex: {0.user_regex}z'Role: {0.role!r}, regex: {0.role_regex}z(Type: {0.type_!r}, regex: {0.type_regex}z�Range: {0.range_!r}, subset: {0.range_subset}, overlap: {0.range_overlap}, superset: {0.range_superset}, proper: {0.range_proper}N)rr)r
rrrr�_match_context_debug\s
z!MatchContext._match_context_debugcCs�|jrt|j|j|j�rdS|jr<t|j|j|j�r<dS|jrZt|j|j|j�rZdS|jr�t|j|j|j	|j
|j|j�r�dSdS)z�
        Match the context criteria.

        Parameter:
        obj     An object with context attributes "user", "role",
                "type_" and "range_".
        FT)
�userrr�roler�type_r�range_r�range_subset�
range_overlap�range_superset�range_proper)r
�contextrrr�_match_contextds0	



zMatchContext._match_contextN)rrrrrrrr rr!rr"r$r#r%r&rr(rrrrr5s



rc@s0eZdZdZed�ZdZdZdd�Zdd�Z	dS)	�	MatchNamez=Mixin for matching an object's name with alias dereferencing.�
name_regexFcCs|jdj|��dS)z)Log debugging messages for name matching.z?Name: {0.name!r}, regex: {0.name_regex}, deref: {0.alias_deref}N)rr)r
rrrr�_match_name_debug�szMatchName._match_name_debugcCsH|js
dS|jr4t||j|j�p2t|j�|j|j�St||j|j�SdS)z&Match the object to the name criteria.TN)�name�alias_derefrr*rr)r
rrrr�_match_name�szMatchName._match_nameN)
rrrrrr,r*r-r+r.rrrrr)�sr)c@s.eZdZdZedd�ZdZdd�Zdd�Zd	S)
�
MatchObjClassz%Mixin for matching an object's class.�tclass_regexZlookup_classFcCs|jdj|��dS)z0Emit log debugging info for permission matching.z,Class: {0.tclass!r}, regex: {0.tclass_regex}N)rr)r
rrrr�_match_object_class_debug�sz'MatchObjClass._match_object_class_debugcCs6|js
dS|jr&t|jjt|j���S|j|jkSdS)z�
        Match the object class criteria

        Parameter:
        obj     An object with an object class attribute named "tclass"
        TN)�tclassr0�bool�search�str)r
rrrr�_match_object_class�s
z!MatchObjClass._match_object_classN)	rrrrrr2r0r1r6rrrrr/�s

r/c@s4eZdZdZed�ZdZdZdZdd�Z	dd�Z
dS)	�MatchPermissionz+Mixin for matching an object's permissions.�perms_regexFcCs|jdj|��dS)z0Emit log debugging info for permission matching.z[Perms: {0.perms!r}, regex: {0.perms_regex}, eq: {0.perms_equal}, subset: {0.perms_subset!r}N)rr)r
rrrr�_match_perms_debug�sz"MatchPermission._match_perms_debugcCs6|js
dS|jr|j|jkSt|j|j|j|j�SdS)z�
        Match the permission criteria

        Parameter:
        obj     An object with a permission set class attribute named "perms"
        TN)�perms�perms_subsetr�perms_equalr8)r
rrrr�_match_perms�s
zMatchPermission._match_permsN)rrrrrr:r<r8r;r9r=rrrrr7�sr7)�reZdescriptorsrr�utilrrrrr	rr)r/r7rrrr�<module>sV
© 2025 GrazzMean