<configure
	xmlns="http://namespaces.zope.org/zope"
	i18n_domain="ztfy.thesaurus">

	<!-- Thesaurus permissions -->
	<permission
		id="ztfy.ManageThesaurus"
		title="[ztfy.ManageThesaurus] ZTFY: Manage thesaurus" />

	<permission
		id="ztfy.ManageThesaurusContent"
		title="[ztfy.ManageThesaurusContent] ZTFY: Manage thesaurus content" />

	<permission
		id="ztfy.ManageThesaurusExtract"
		title="[ztfy.ManageThesaurusExtract] ZTFY: Manage thesaurus extract" />

	<!-- Thesaurus roles -->
	<role
		id="ztfy.ThesaurusManager"
		title="[ztfy.ThesaurusManager] ZTFY: Thesaurus manager" />

	<role
		id="ztfy.ThesaurusContentManager"
		title="[ztfy.ThesaurusContentManager] ZTFY: Thesaurus content manager" />

	<role
		id="ztfy.ThesaurusExtractManager"
		title="[ztfy.ThesaurusExtractManager] ZTFY: Thesaurus extract manager" />

	<!-- Thesaurus manager grants -->
	<grant
		role="ztfy.ThesaurusManager"
		permission="ztfy.ManageThesaurus" />

	<grant
		role="ztfy.ThesaurusManager"
		permission="ztfy.ManageThesaurusContent" />

	<grant
		role="ztfy.ThesaurusManager"
		permission="ztfy.ManageThesaurusExtract" />

	<grant
		role="ztfy.ThesaurusManager"
		permission="ztfy.ViewManagementScreens" />

	<!-- Thesaurus content manager grants -->
	<grant
		role="ztfy.ThesaurusContentManager"
		permission="zope.ManageContent" />

	<grant
		role="ztfy.ThesaurusContentManager"
		permission="ztfy.ManageThesaurusContent" />

	<grant
		role="ztfy.ThesaurusContentManager"
		permission="ztfy.ManageThesaurusExtract" />

	<grant
		role="ztfy.ThesaurusContentManager"
		permission="ztfy.ViewManagementScreens" />

	<!-- Thesaurus extract manager grants -->
	<grant
		role="ztfy.ThesaurusExtractManager"
		permission="ztfy.ManageThesaurusExtract" />

	<grant
		role="ztfy.ThesaurusExtractManager"
		permission="ztfy.ViewManagementScreens" />

	<!-- Zope manager grants -->
	<grant
		role="zope.Manager"
		permission="ztfy.ManageThesaurus" />

	<grant
		role="zope.Manager"
		permission="ztfy.ManageThesaurusContent" />

	<grant
		role="zope.Manager"
		permission="ztfy.ManageThesaurusExtract" />

	<!-- Grant roles to principals -->
	<subscriber
		handler=".security.handleGrantedOperatorRole" />

	<subscriber
		handler=".security.handleRevokedOperatorRole" />

</configure>
