Uploaded image for project: 'Seam Security'
  1. Seam Security
  2. SEAMSECURITY-69

Call to associateGroups(head, branch) does not persist the group relationship

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0.Final
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Windows 7 x64, MySQL 5.1

      Description

      This is using MySQL 5.1 and it appears the association is not being persisted. If I manually enter the table row the association is detected correctly. But, the call to associateGroups is not persisting the relationship. I have used the following code to test out this:

      package org.jboss.seam.security.examples.idmconsole.tests;

      import javax.inject.Inject;

      import org.picketlink.idm.api.Group;
      import org.picketlink.idm.api.IdentitySession;
      import org.picketlink.idm.api.PersistenceManager;
      import org.picketlink.idm.api.RelationshipManager;
      import org.picketlink.idm.common.exception.IdentityException;

      public class TestSecurity {

      @Inject IdentitySession identitySession;

      public String testAction() throws IdentityException {
      PersistenceManager pm = identitySession.getPersistenceManager();
      RelationshipManager rm = identitySession.getRelationshipManager();
      Group head = pm.findGroup("Head Office", "ORGANIZATION_UNIT");
      Group branch = pm.findGroup("Branch Office", "ORGANIZATION_UNIT");
      if( ! rm.isAssociated(head, branch) )

      { rm.associateGroups(head, branch); }

      boolean isAssociated = rm.isAssociated(head, branch);
      return null;
      }
      }

      The 2 groups in the test code exist in my test DB when I run the above code. I single step through the code to verify the situation after each line and everything is as expected, except that the call to rm.associateGroups(head, branch); does not persist the association.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            gkar47 Bill Elliot (Inactive)
            Archiver:
            samahaja Sagar Mahajan

              Dates

              Created:
              Updated:
              Archived: