WordPress.org

Forums

s2member Secure File Browser
[resolved] Restrict to Specific Users (8 posts)

  1. anchoradmin
    Member
    Posted 1 year ago #

    Plugin Author,

    Can I use this plugin to restrict file downloads to specific users?

    Can I create a group of users, who may only access a specific group of files?

    Are files able to be password protected?

    Thanks!

    https://wordpress.org/plugins/s2member-secure-file-browser/

  2. Li-An
    Member
    Posted 1 year ago #

    You have to use the restrictions managed by S2member (role, custom capacities...).

  3. Potsky
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry anchoradmin, I have never seen your message...

    You can group users with s2member custom capacities. There is no password protection available.

  4. cmsamo
    Member
    Posted 4 months ago #

    Is there a guide or video on how to set this all up? I tried using roles/custom capabilities but whenever I display files, I always see all of the directories in my tree, not just the ones I want to limit to that particular user

  5. Potsky
    Member
    Plugin Author

    Posted 4 months ago #

    Hi cmsamo,

    there is no video tutorial, sorry. But it is straightforward. There is an embedded documentation in your dashboard at the following address : https://XXX/wp-admin/admin.php?page=psk_s2msfb_manager_docshortcode

    If you take a look on the displayall shortcode parameter, you can see that setting this parameter to 1 will only display allowed directories for current authenticated user.

    Be careful, if you have a huge count of directories, it can really slow down the page response.

  6. cmsamo
    Member
    Posted 4 months ago #

    Thanks for the reply. I guess I don't have things set up correctly. I've applied some CCAP to some of my pages, and everything is working correctly in that when I log in with different users, I see the different pages that I should see, based on restricting access via CCAP.

    However, my file browser always shows all files and directories from the root, so I am missing a step in restricting users...

    The short-code I am using is below:

    [s2member_secure_files_browser collapseeasing="swing" collapsespeed="500" cutdirnames="0" cutfilenames="0" dirbase="%2F" dirfirst="1" displayall="0" displaybirthdate="1" displaycomment="1" displaydownloaded="0" displaysize="1" displaymodificationdate="0" dirzip="0" expandeasing="swing" expandspeed="500" folderevent="click" hidden="0" multifolder="1" openrecursive="0" s2alertbox="0" search="1" searchgroup="0" searchdisplay="0" sortby="3" /]

    Do I need to add some additional logic into the page?

  7. Potsky
    Member
    Plugin Author

    Posted 4 months ago #

    Just set displayall to 1 instead of 0 in your short code and it will work !

  8. cmsamo
    Member
    Posted 4 months ago #

    Yes - I'd done that, I just posted the wrong shortcode when I replied :)

    It did not work at first. I ended up deleting all of the created files and folders from /s2MemberFiles/ and recreating them. In addition I recreated all the CCAP tags on my users. I rebuilt my page with the shortcode and now the file browser works, and it shows all directories, and redirects users to log in when they click on files they don't have access to. Thanks for the follow up :)

    The next step is to prevent the plugin from allowing users to see files they don't have access to. I'll go and read the shortcode docs again :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • s2member Secure File Browser
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic