Issue with CB Subs & Folder Access Intergration

1 year 1 month ago #333155 by danpoole
Hi, I'm having the following issue with CB Subs Folder Access.

The setup
  • Plan > Integrations > Folder Access
    • Path = confirmed and setup correctly.
    • Type = Absolute.
    • Allow Directory List = Yes.
    • Status (absolute) = exists and is writable.
    • folder CHMOD 755
    • .htpasswd file CHMOD 644
    • Everything is up to date
Usage
  • In admin & front end testing
    • adding subscription to user does not add the username and password to the .htpasswd file.
    • It was working initially, when I set it up a while ago.
    • When I save a new password in the user admin or front end and that user is subscribed to one or two things the .htpasswd will then update and add the username and password.
    • When I unsubscribe from those subscriptions the user & pass are not removed.
    • In short, the .htpasswd file only updates when the password is changed/updated, not the subscription.
Please let me know if you need any more information.

Please Log in to join the conversation.

1 year 1 month ago #333159 by krileon
They can only be added to the password file when we're able to get the password in plaintext. So basically when they login, update their profile password, or register (only works with free plans a paid plans move away from registration).

When I unsubscribe from those subscriptions the user & pass are not removed.

That sounds like a bug. It should remove them when they unsubscribe. Are you doing this test from backend or frontend? Backend might be a bit wonky in this regard due to a user store and subscription update happening at same time.

As a side note is there a reason you need to use this plugin still? We now offer ways to better access files that don't require using htaccess auth logins, which are not very user friendly. CB Package Builder for example can build out files from directories and CB Gallery supports storage of files so files could just be uploaded and downloaded from there both of which would let you use normal Joomla ACL.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 1 month ago - 1 year 1 month ago #333173 by danpoole

As a side note is there a reason you need to use this plugin still? We now offer ways to better access files that don't require using htaccess auth logins, which are not very user friendly. CB Package Builder for example can build out files from directories and CB Gallery supports storage of files so files could just be uploaded and downloaded from there both of which would let you use normal Joomla ACL.

As a part of their subscription, they get access to little programs written in livecode.com coded by another developer. So the subscribers get a link to a folder on a subdomain calling up the index.html file running it's own page/site sourcing assets from that folder. At the time, the .htpasswd method seemed to be the best.

They can only be added to the password file when we're able to get the password in plaintext. So basically when they login, update their profile password, or register (only works with free plans a paid plans move away from registration).

OK, so when I test it, I'm doing it from the admin, I add them to a plan (a paid plan) and then logging into their account using a plugin (extensions.joomla.org/extension/login-as-user/). So this won't activate the password update in the .htpasswd file as I'm not submitting their actual password on the login page. I have now checked this, and I can confirm it is adding their username and password to the htpasswd file.

I have also tested removing myself (in the admin) from a subscription and this is now working??? I thought it might have been because I was selecting the subscription instead of unsubscribing, but I tested just deleting it and that worked successfully also???

So I guess this is solved?

Please Log in to join the conversation.

1 year 1 month ago #333189 by krileon

As a part of their subscription, they get access to little programs written in  livecode.com  coded by another developer. So the subscribers get a link to a folder on a subdomain calling up the index.html file running it's own page/site sourcing assets from that folder. At the time, the .htpasswd method seemed to be the best.

A better solution might be to actually just execute that code from within Joomla and block direct root access to that folder using htaccess entirely. So one way to do this is to use CB Auto Actions. A Code action can be used to do a PHP include of your code and then it can output the results directly inside of Joomla. You can then use ACL on the auto action. Now the user just needs to login to your Joomla site and access your menu item that points to the auto action with no extra work from them and no need to deal with htpasswd problems.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.369 seconds

Facebook Twitter LinkedIn