I have Memberships and Subscriptions. I also use a 1-month free trial period through the subscription product.
I signed up as a testuser and was assigned an active membership. I canceled the subscription as the testuser on 'My Account' page, which set the subscription to pending cancellation, and set the membership to end at the end of the trial. The download button continued to appear, which sounds right as it is tied to the membership.
As the Administrator, I cancelled the testuser Subscription, Membership and checked the user had returned to a default user role (not active subscriber) and that the membership is not active, that user is still able to see the download button. I've tried logging out, clearing cache, different browsers, but the user can still see download the button.
Update. 11/13: What could be causing the user with no active membership to see the download button? Is it just because they are logged in? Should there be a setting to display a message if a user is logged in but doesn't have an active membership? I set "Include selected memberships only" and included my membership, and the button disappears. I suspect that this is close to the correct setting but there needs to be a message to inform the user that there is a problem with their membership/subscription. Also, the message to say the user is not logged in is now gone for all users not logged in.
I'm a little confused.