Repository URL to install this package:
Version:
5.1.2-5.1 ▾
|
python3-dmapi-el9
/
usr
/
lib
/
python3.9
/
site-packages
/
dmapi
/
__pycache__
/
policy.cpython-39.pyc
|
---|
a քe4" ã @ s d Z ddlZddlZddlZddlmZ ddlmZ ddl m Z ddlmZ ddl mZ ddlmZmZ dd l mZ ejZe e¡Zdad gZg ae d¡Zdd Zd'ddZdd Zdd Zd(ddZ d)ddZ!dd Z"e #d¡G dd de j$Z%dd Z&d!d" Z'd#d$ Z(d%d& Z)dS )*zPolicy Engine For Dmapi.é N)Úcfg)Úlog)Úpolicy)Úexcutils)Ú exception)Ú_LEÚ_LW)Úpolicieszos-keypairsz%\((\w+)\)sc C s t rt ¡ d a d S ©N)Ú _ENFORCERÚclear© r r ú0/usr/lib/python3.9/site-packages/dmapi/policy.pyÚreset" s r Tc C sT t s(tjt| |||da tt t ¡ t j}t|}t|krPt | t |¡adS )aë Init an Enforcer class. :param policy_file: Custom policy file to use, if none is specified, `CONF.policy_file` will be used. :param rules: Default dictionary / Rules to use. It will be considered just in the first instantiation. :param default_rule: Default rule to use, CONF.default_rule will be used if none is specified. :param use_conf: Whether to load rules from config file. )Úpolicy_fileÚrulesÚdefault_ruleÚuse_confN)r r ZEnforcerÚCONFÚregister_rulesZ load_rulesZ file_rulesÚ_serialize_rulesÚsaved_file_rulesÚ(_warning_for_deprecated_user_based_rulesÚcopyÚdeepcopy)r r r r Zcurrent_file_rulesr r r Úinit) s ür c C s&