Uploaded image for project: 'Metadata Deploy Module'
  1. Metadata Deploy Module
  2. DPLY-1

Overwriting of existing roles can lose inherited roles

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      When repeating installation of a role, the inherited roles of that role are lost, e.g. the following test fails:

      deployService.installObject(role("Role1", "Testing", null, null));
      deployService.installObject(role("Role2", "Testing", idSet("Role1"), null));
      
      Context.flushSession();
      Context.clearSession();
      
      // Shows correct table
      TestUtil.printOutTableContents(getConnection(), "role_role");
      
      deployService.installObject(role("Role1", "Testing", null, null));
      deployService.installObject(role("Role2", "Testing", idSet("Role1"), null));
      
      Context.flushSession();
      Context.clearSession();
      
      // Shows empty table
      TestUtil.printOutTableContents(getConnection(), "role_role");
      
      Role role1 = MetadataUtils.getRole("Role1");
      Role role2 = MetadataUtils.getRole("Role2");
      
      Assert.assertThat(role2.getInheritedRoles(), contains(role1));
      

        Attachments

          Activity

            People

            Assignee:
            rowanseymour Rowan Seymour
            Reporter:
            rowanseymour Rowan Seymour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: