WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP-Filebase Download Manager] WP-Filebase Admin can download files other users can not

[Resolved] [Plugin: WP-Filebase Download Manager] WP-Filebase Admin can download files other users can not

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Fabian

    @fabifott

    Dou you have custom user roles?
    Just found a little bug in classes/File.php.
    Will be fixed next update.
    You can patch the file to get it working right now:

    in classes/File.php look for

    $dl_limit = intval(WPFB_Core::GetOpt('daily_limit_'.$user_role));
    if($usr_dls_today >= $dl_limit)
    	$this->DownloadDenied(($dl_limit > 0) ? sprintf(WPFB_Core::GetOpt('daily_limit_exceeded_msg'), $dl_limit) : 'inaccessible_msg');

    and replace it with:

    $dl_limit = intval(WPFB_Core::GetOpt('daily_limit_'.$user_role));
    if($dl_limit > 0 && $usr_dls_today >= $dl_limit)
    	$this->DownloadDenied(sprintf(WPFB_Core::GetOpt('daily_limit_exceeded_msg'), $dl_limit));

    Thank you for your response! Your plugin is wonderful and I will be contributing soon — once I figure out some of these little issues.

    Yes — I have custom user roles. I want files downloadable only by registered users, including my custom roles. But when I enabled “Daily user download limits”, which is the only way I could see to have it default to members-only for all files, WP-Filebase didn’t recognize my custom user roles as having permission.

    We don’t actually need the limits, so I’m working around this by disabling the download limits and making each individual file (all pdfs so far) ‘members only’ instead of ‘everyone’ and selecting the user roles in the dropdown (using the ‘extended form’ when uploading the files).

    It would be nice to be able to set this as a default setting for all files, to be over-ridden in individual files, though, so that the site manager doesn’t have to fuss with each file she uploads. Is there a way to do this?

    Plugin Author Fabian

    @fabifott

    Defaults can be set in WP-Filebase settings now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: WP-Filebase Download Manager] WP-Filebase Admin can download files other users can not’ is closed to new replies.