golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/acl/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
1.87 KB
Del
OK
Edit: __init__.cpython-310.pyc
o �xe� � @ s d Z ddlZG dd� d�ZdS )z� The acl module handles publisher_acl operations Additional information on publisher_acl can be found by reading the salt documentation: https://docs.saltproject.io/en/latest/ref/publisheracl.html � Nc @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� ZdS ) �PublisherACLze Represents the publisher ACL and provides methods to query the ACL for given operations c C s || _ d S )N�� blacklist)�selfr � r �E/opt/saltstack/salt/lib/python3.10/site-packages/salt/acl/__init__.py�__init__ s zPublisherACL.__init__c C s t jjj|| j�dg �d� S )z� Takes a username as a string and returns a boolean. True indicates that the provided user has been blacklisted �usersr ��salt�utils�stringutils�check_whitelist_blacklistr �get�r �userr r r �user_is_blacklisted s �z PublisherACL.user_is_blacklistedc C s@ t |t�r|g}|D ]}tjjj|| j�dg �d�s dS q dS )N�modulesr TF�� isinstance�strr r r r r r �r �cmdZfunr r r �cmd_is_blacklisted! � ��zPublisherACL.cmd_is_blacklistedc C s t jjj|| j�dg �d�S )Nr �Z whitelistr r r r r �user_is_whitelisted, s �z PublisherACL.user_is_whitelistedc C s@ t |t�r|g}|D ]}tjjj|| j�dg �d�r dS q dS )Nr r TFr r r r r �cmd_is_whitelisted1 r zPublisherACL.cmd_is_whitelistedN) �__name__� __module__�__qualname__�__doc__r r r r r r r r r r s r )r! Zsalt.utils.stringutilsr r r r r r �<module> s
Save