Very good answer, is it possible to change the line
if (MembershipContext.AuthenticatedUser.HasMembership("someMembership"))
so if they do not have the specified membership.
Also so "someMembership" could be made from half text and a fieldname such as
"some +CurrentDocument.Parent"
As this way it can cover multiple memberships as they all have similiar paths.