How Would You Provide a Password Protection Section?

Community Forums Forums General Discussion How Would You Provide a Password Protection Section?

This topic is: not resolved

This topic contains 5 replies, has 3 voices, and was last updated by  Mealtog 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #81981

    Mealtog
    Participant
    Post count: 439

    So I have a need to provide a password protected section where members only should be able to download PDF’s that are meant for current customers. Issue is, current customers mean a brick and mortar’s customers. They may or may not be tech savvy and there are hundreds of them.

    1. Set up password protection of a folder in cpanel, upload PDF’s here and control use log ins inside cpanel.

    2. Set up private pages with links to PDF’s inside WordPress and use it for member only downloads.

    A. Which way would be a better way?

    B. There is no way to ask the client to manage a unique log in for all customers so they might just create 4-5 logs ins and divide up their customers and allocate a log in based on last names. A-D = log in 1, E-G = log in 2, etc…

    Can anyone share insight on the best way to achieve this?

    Note, customers change every year as this is a school and students come and go.

    Any thoughts?

    #81985

    Summer
    Participant
    Post count: 1105

    Why couldn’t all the students register themselves through the website, and have a user role for “students” to give them access to the pages you need to have them be able to download from?

    Then at the end of the term, blow away all the registered student accounts, and start with a fresh slate for the next term, repeating the process.

    People register themselves for sites all the time, I would hope the same thing would work on this site, too.


    #81986

    Mealtog
    Participant
    Post count: 439

    Good thought. Let me address this and see if we can find a good solution.

    1. We cannot allow anyone to register as they will have access to sensitive documents. Competitors will do this for sure.

    2. If we use WordPress to control a page (password protected say), the PDF link can still be accessed is the user types it in directly.

    So instead of the htaccess way, can WordPress be set up to control the actual PDF link itself? Just a thought.

    I must add, I would love to find a way for this to work using WordPress. Easy admin versus teaching the client to go in to cpanel. I can only imagine the horror in their eyes when I show them that.

    • This reply was modified 9 months ago by  Mealtog.
    • This reply was modified 9 months ago by  Mealtog.
    #81993

    Craig
    Member
    Post count: 62

    I’m not sure about using WordPress to control the actual PDF link – I think I’d approach this much like Summer suggested earlier.

    1. Use Members plugin to create a “Student” role.
    2. Register 4 or 5 generic “Student” users so that login details can be shared between groups.
    3. Create a page that contains links to the PDF documents, and use Restrict Content plugin to only allow users with role=”Student” (or greater) to view.
    4. Implement a log in form on the front end somewhere, that checks for user level of Student and forwards them to the PDF page.

    Protecting the PDFs from being directly accessed could just be putting a .htaccess in their containing folder I think.


    • This reply was modified 9 months ago by  Craig.
    • This reply was modified 9 months ago by  Craig.
    • This reply was modified 9 months ago by  Craig.
    • This reply was modified 9 months ago by  Craig.
    #82057

    Summer
    Participant
    Post count: 1105

    Actually there are several solutions that are ecommerce-based that protect or mask the links for media downloads, and those could be configured to allow for free downloads to specific roles. You can even limit the number of times a file can be downloaded by each user, so if you had 25 different documents, you could limit each user to be able to download each document 3 times, or 5 times, or make it unlimited.

    Easy Digital Downloads is one, WP eStore by Tips & Tricks HQ is another, and I’ve used both for something similar. Not sure if WooCommerce allows digital goods in their default free cart or if you have to buy an extension for that these days, but WC and MarketPress have options to do this, but might be overkill in terms of the needs you’ve specified here.

    As for student access, it might be easier just for there to be a menu for the topics that only students can access, and it would only be visible/accessible when they are logged in; otherwise it just wouldn’t be there, or if it is there, any attempts to access it would have a message saying “You must be logged in to view this content”.

    If you want more features available, you could go with full blown membership plugins like Premise, S2Member, Wishlist, and a handful of others.

    Are these going to be courses, classes that students are taking, or just supplemental information for them to access while taking classes?


    #82201

    Mealtog
    Participant
    Post count: 439

    Great tips Summer. I ended up locating an plugin that does exactly this:

    1. Control user files based on role
    2. Masks uploaded path so the public has a minimal chance on landing on the URL that contains the files

    Plug is WP Filebase. It has tons of other functions but all we need is the above so this works well. It basically creates an htaccess file to deny all viewers from looking into the upload directory and then uses WP role to allow access to the uploaded files.

    I am glad to have found this. I did NOT want to hand code this. Hope this can help others out there.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.