I have an Ubercart ecommerce Drupal 7 site I'm building. The user can either subscribe (monthly/annually) or purchase node by node (pay as you go).
I need to GRANT the subscriber or purchaser access to the main body field of the product node only, as teasers and image fields etc will be used elsewhere on the site. (This rules out a few node_access options)
I would like to combine the permissions in my own custom module, as the I can't see any contrib permissions modules that fit my needs. e.g. Node access product.
Is there an simple custom way to ALLOW access to a field after I have checked if the user has:
a) Purchased this node, or
b) is a subscriber with access (I'm using uc_recurring for ROLE assign on purchasing a subscription).
I think it could due done manually in a module checking directly for current logged in users role(s) and purchases (nid's) and seeing is the logic plays out, but will this be slow on performance when there are 1000's users and 1000's products?
Please let me know if you need any more information or if I'm on the right track.