stiletModificationmodificationOpen budget0 bids$0 average bid26th of November 2012

Requires completion of the module BxStoreModule.php

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;
}

 
Bids
No bids so far.
 
 
Comments
·Oldest
·Top
Please login to post a comment.
Hello,
Please contact me if you still need help with this. Thanks.
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.061803102493286