Sorry for bad English.
There is a function in the script, which allows downloading a file (code below). Need to make a code that will change a little bit of logic that has permission to download - namely, permission to download will depend on the user's group.
You need to add the analysis levels of membership the user belongs to (one or more).
All available levels of membership can be found in the table - sys_acl_levels.
Check to what level of membership they belong to by the user can be found in the table - sys_acl_levels_members
Current permissions in the code (modules/boonex/store/classes/BxStoreModule.php):
1. Download authorized administrator.
2. Download the price of goods allowed to be 0 (free goods)
3. Download allowed those who bought when it.
function isAllowedDownload (&$aItem)
{
if ($this-> isAdmin ())
return true;
if (0 == $aItem[' price'] &&$this-> _oPrivacyFile-> check (' purchase', $aItem[' id'], $this-> _iProfileId))
return true;
if ($this-> _oDb-> isPurchasedItem ($this-> _iProfileId, $aItem[' id']))
return true;
return false;
}