question: private void addConnectionDescendants ( Collection < Connection > connections , List < ObjectPermission . Type > permissions ) throws GuacamoleException { if ( connections . isEmpty ( ) ) return ; Collection < String > identifiers = new ArrayList < String > ( ) ; for ( Connection connection : connections ) identifiers . addAll ( connection . getSharingProfileIdentifiers ( ) ) ; if ( permissions != null && ! permissions . isEmpty ( ) ) identifiers = sharingProfilePermissions . getAccessibleObjects ( permissions , identifiers ) ; if ( ! identifiers . isEmpty ( ) ) { Collection < SharingProfile > sharingProfiles = sharingProfileDirectory . getAll ( identifiers ) ; addSharingProfiles ( sharingProfiles ) ; } }
target:  Adds all descendant sharing profiles of the given connections to their corresponding primary connections already stored under root.