WP-Filebase Download Manager
[resolved] WP-Filebase Admin can download files other users can not (4 posts)

  1. writecraft
    Posted 4 years ago #

    Have WP-Filebase file permissions set to everyone, yet only Admin can download files. Other users get message: You are not allowed to access this file! Disabling permalinks made no difference. Is there a minimum user role permission level needed?


  2. Fabian
    Plugin Author

    Posted 4 years ago #

    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));
  3. writecraft
    Posted 4 years ago #

    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?

  4. Fabian
    Plugin Author

    Posted 4 years ago #

    Defaults can be set in WP-Filebase settings now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic