private static void updateAccess(
            final Map<Type, Permission> senderTypes,
            final Type senderType,
            final Permission commandPermission
    ) {
        senderTypes.compute(senderType, (key, existing) -> {
           if (existing == null) {
               return commandPermission;
           }
           return Permission.anyOf(existing, commandPermission);
        });
    }
Propagates permission and sender type requirements from the {@link Command} owning the {@code leafNode}'s component down
the tree, merging as is appropriate for nodes shared by multiple chains.

@param leafNode leafNode
cloud-core/src/main/java/org/incendo/cloud/CommandTree.java