Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-937

Fix generation of ACL in structure template

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.6
    • Component/s: None
    • Tags:
    • Backlog priority:
      400

      Description

      When setting an ACL on a child document, it generates an ACL tag outside the document element and bound to another factoryBinding:

      <extension target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService" point="factoryBinding">
      <factoryBinding name="DomainFactory" factoryName="SimpleTemplateFactory" targetType="Domain">
        <template>
          <templateItem typeName="WorkspaceRoot" id="workspaces" title="Workspaces" description="Workspace Root"/>
          <templateItem typeName="SectionRoot" id="sections" title="Sections" description="Sections Root"/>
          <templateItem typeName="TemplateRoot" id="templates" title="Templates" description="Workspace Templates Root"/>
          <templateItem typeName="WorkspaceRoot" id="universe" title="Universe" description=""/>
        </template>
      </factoryBinding>
      <factoryBinding name="WorkspaceRootFactory" factoryName="SimpleTemplateFactory" targetType="WorkspaceRoot">
        <acl>
          <ace principal="foo" permission="Everthing" granted="true"/>
          <ace principal="Everyone" permission="Everything" granted="false"/>
        </acl>
      </factoryBinding>
      <factoryBinding name="SectionRootFactory" factoryName="SimpleTemplateFactory" targetType="SectionRoot">
        <acl>
          <ace principal="Everyone" permission="Everything" granted="true"/>
        </acl>
      </factoryBinding>
      <factoryBinding name="WorkspaceRootFactory" factoryName="SimpleTemplateFactory" targetType="WorkspaceRoot">
        <acl>
          <ace principal="jack" permission="Write" granted="true"/>
        </acl>
      </factoryBinding>
      

      => problems with two factories bound to WorkspaceRoot

      The correct generation should look like below, with ACL tag inside templateItem tag

      <extension target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService" point="factoryBinding">
      <factoryBinding name="DomainFactory" factoryName="SimpleTemplateFactory" targetType="Domain">
        <template>
          <templateItem typeName="WorkspaceRoot" id="workspaces" title="Workspaces" description="Workspace Root">
            <acl>
              <ace principal="foo" permission="Everthing" granted="true"/>
              <ace principal="Everyone" permission="Everything" granted="false"/>
            </acl>
          </templateItem>
          <templateItem typeName="SectionRoot" id="sections" title="Sections" description="Sections Root">
            <acl>
              <ace principal="Everyone" permission="Everything" granted="true"/>
            </acl>
          </templateItem>
          <templateItem typeName="TemplateRoot" id="templates" title="Templates" description="Workspace Templates Root"/>
          <templateItem typeName="WorkspaceRoot" id="universe" title="Universe" description="">
            <acl>
              <ace principal="jack" permission="Write" granted="true"/>
            </acl>
          </templateItem>
        </template>
      </factoryBinding>
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3 hours
                3h
                Remaining:
                Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified