Skip to content

Commit

Permalink
fix for adding orgParentRef only for member/manager (MID-6730)
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Nov 30, 2020
1 parent bfd9806 commit 1af0dba
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -2252,6 +2252,17 @@ public static <AHT extends AssignmentHolderType> void initNewObjectWithReference
AssignmentType assignment = new AssignmentType();
assignment.setTargetRef(ref);
assignmentHolder.getAssignment().add(assignment);

// Set parentOrgRef in any case. This is not strictly correct.
// The parentOrgRef should be added by the projector. But
// this is needed to successfully pass through security
// TODO: fix MID-3234
if (ref.getType() != null && OrgType.COMPLEX_TYPE.equals(ref.getType())) {
if(ref.getRelation() == null || pageBase.getRelationRegistry().isStoredIntoParentOrgRef(ref.getRelation())) {
assignmentHolder.getParentOrgRef().add(ref.clone());
}
}

});
}

Expand Down

0 comments on commit 1af0dba

Please sign in to comment.