Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Important note: There are 3 types of limitations that are not used in the 3rd type of tokens. Reason for that is because it would greatly increased number of tokens added to documents. In best case scenario it would add hundred tokens to documents but in some cases it would be possible to add even few thousands more tokens to some group of documents. That three types of limitations: Owner, Group and Subtree are least probable to be used in conjunction with other limitations. If in your eZ Publish you are using one of these limitation with other limitation you can add support to it by adding custom Security Source.

Limitation typeLimitation ValueAdditional information
ContentTypeContent type ID
LocationLocation ID
SectionSection ID
StateState ID
OwnerDocument's owner ID
GroupOwner's group IDDocument gets one token for each group owner directly belongs to.
SubtreePath to documentDocument gets one token for each level of the path that leads to the document.

Identification

Scope: 'eZPublish_' + scope suffix provided in Admin Wizard

...

The easiest way to do this is to set log level to debug and let the user log in to Locator again. You will see the format of the unsupported combination of limitations for example: "Limit_ContentType=1_Section=2_Owner=1000". In that case you should create query that will add tokens with Content Type, Section and Owner limitations to documents. You can copy Custom template from the connector definition, uncomment it and remove the limitations you don't need. In example format "Limit_ContentType=1_Section=2_Owner=1000" modified query would look like this:

Code Block
languagesqlxml
themeEmacs
titleCustom Security Source
<add name="ContentType-Section-Owner" type="DbDocumentSecuritySource">
  <GetRulesQuery>
	<SqlTemplate>
	  SELECT DISTINCT
	  CONCAT('eZPublish_', '{{config.scopesuffix}}') AS SIDScope,
	  CONCAT
	  ('Limit',
	  '_ContentType=', co.contentclass_id,
	  '_Section=', co.section_id,
	  '_Owner=', co.owner_id
	  ) AS SID,
	  'DocumentAllowRule' as RuleType
	  FROM {{config.schema}}.ezcontentobject co
	  WHERE
	  co.id = ?
	</SqlTemplate>
	<TemplateParameters>
	</TemplateParameters>
	<CommandParameters>
	  <add name="@Id">
		<Type value="Int32" />
		<ReferenceName value="SR_id" />
	  </add>
	</CommandParameters>
  </GetRulesQuery>
</add>

...