Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-4401

The default contribution of group2group (groupchild) is inverted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2 M4, 5.2 RC1, 5.2 RC1 SP1, 5.2 GA, 5.2 GA SP1, 5.3 RC, 5.3 GA
    • Fix Version/s: 5.3.1
    • Component/s: Directory
    • Impact type:
      Content model Change
    • Upgrade notes:
      Hide

      If using a SQL database for group management, and using groups of groups, the "group2group" table must be fixed as its columns were inverted.

      Show
      If using a SQL database for group management, and using groups of groups, the "group2group" table must be fixed as its columns were inverted.

      Description

      From Nuxeo DM using an sql database to store groups (not ldap), when adding a subgroup "subgroup" to a group "group", it is adding a entry in group2group table:

      • subgroup as parentGroupId
      • group as childGroupId
        and should be
      • group as parentGroupId
      • subgroup as childGroupId

      The default contribution is not correct: (server/default/deploy/nuxeo.ear/config/default-sql-directories-bundle.xml)

      <references>
        <tableReference field="members" directory="userDirectory"
          table="user2group" sourceColumn="groupId" targetColumn="userId" schema="user2group" 
          dataFile="user2group.csv" />
        <tableReference field="subGroups" directory="groupDirectory"
          table="group2group" sourceColumn="childGroupId" 
          targetColumn="parentGroupId" schema="group2group" />
        <inverseReference field="parentGroups" directory="groupDirectory"
          dualReferenceField="subGroups" />
      </references>
      

      where sourceColumn should be parentGroupId and targetColumn should be childGroupId

      Upgrading from < 5.3.1, the fields need to be inverted in the table group2group (if using sql for groups). If the database modification is not done, parent groups will become child groups and child groups will become parent groups.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: