Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Jul 25, 2014
2 parents 9c223b8 + f773129 commit f425bc1
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -85,8 +85,9 @@ public AssignmentEditorDto(ObjectType targetObject, AssignmentEditorDtoType type
// newAssignment.setConstruction(construction.clone());
// }

this.name = getNameForTargetObject(targetObject);
this.tenantRef = loadTenantReference(targetObject, assignment, pageBase);

this.name = getNameForTargetObject(targetObject);
}

private ObjectViewDto loadTenantReference(ObjectType object, AssignmentType assignment, PageBase page){
Expand Down Expand Up @@ -137,12 +138,18 @@ private String getNameForTargetObject(ObjectType object) {
builder.append(" (").append(getRelation()).append(')');
}

if(object instanceof RoleType){
if(tenantRef != null && tenantRef.getOid() != null){
builder.append(" - ").append(tenantRef.getName());
}
}

return builder.toString();
}

public List<ACAttributeDto> getAttributes() {
if (attributes == null) {
attributes = new ArrayList<ACAttributeDto>();
attributes = new ArrayList<>();
}
return attributes;
}
Expand Down

0 comments on commit f425bc1

Please sign in to comment.