File: //usr/lib/python3/dist-packages/trac/upgrades/__pycache__/db30.cpython-310.pyc
o
�k�`� � @ sB d dl mZ d dlmZ d dlmZ ddgZdge Zdd� Zd S )
� )�backup_config_file)�printout)�_�DefaultPermissionPolicy�LegacyAttachmentPolicy�ReadonlyWikiPolicyc C s� | j �dd�}|tkr(t| d� | j �ddd�t�� | j �� | j� d� d
S d|vr:| j� d� t
td�� d
S | j� d � d
S )z�Automatically append ReadonlyWikiPolicy if permission_policies is
the default value. Otherwise, echo a message about the need to manually
add ReadonlyWikiPolicy to the list of permission_policies.�trac�permission_policiesz .db30.bakz, zEnabled ReadonlyWikiPolicy.r z,ReadonlyWikiPolicy must be manually enabled.z�Notice: To enable the readonly wiki attribute, trac.ini must be manually
edited to add ReadonlyWikiPolicy to the list of permission_policies in
the [trac] section.
For more details see: https://trac.edgewall.org/wiki/ReadonlyWikiPolicy
z#ReadonlyWikiPolicy already enabled.N)�config�getlist�_old_defaultr �set�join�_new_default�save�log�infor r )�env�version�cursor�policies� r �4/usr/lib/python3/dist-packages/trac/upgrades/db30.py�
do_upgrade s
r N) � trac.utilr �trac.util.textr �trac.util.translationr r r r r r r r �<module> s