Is FlatPress For Me?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Is FlatPress For Me?

Post by NorfolkGreg » Wed Dec 30, 2020 10:11 pm

I want to move my "journal" away from nabble.com

Some of my current content is available to the public and some restricted to family members or friends only.

I can find no login system with FlatPress that would allow certain categories of post to be seen by only a particular group of users.

I take it FlatPress is not for me! Shame because it looks ideal in so many way!

User avatar
Arvid
FlatPress Coder
Posts: 558
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Is FlatPress For Me?

Post by Arvid » Thu Dec 31, 2020 9:27 am

Welcome to the FlatPress support forum :)

In fact, FlatPress does not support access-protected entries. But as an alternative, how about running a public blog at yourdomain.com, and a protected one at yourdomain.com/friendsnfamily? This could be easily done just by running a second FlatPress instance in a subfolder of the main blog. It is then protected from any unauthorized access via htaccess.

If you like to give this approach a try, let us know if it works (or where you could need help).

All the best
Arvid

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: Is FlatPress For Me?

Post by NorfolkGreg » Thu Dec 31, 2020 2:50 pm

Hi Arvid,

Thanks for the welcome. I've never tried this form of access control before and am currently experimenting with it.

This is what I found.

The link you posted includes posts that appear a little dated. In cPanel 92.0.6, which my host runs, DIRECTORY PRIVACY is under FILES rather than SECURITY. However, once I found the right feature I was able to create a private directory and created a user for myself.

I uploaded a test page to the protected directory and was prompted for my credentials on attempting to access it in my browser. From there links to the public part allowed me to cross back. However, what surprised me was that I was not re-prompted for my username or password when accessing the private directory thereafter - even though I did not save the credentials in my browser.

In some ways that is good! It means that once access is gained it appears to remain freely accessible and links from public to private area become seamless. However, I was curious about where/how those access rights are stored or how you log out from that access. I tried again with a second browser and the same thing happened. At first I was prompted for my credentials but after that was free to switch in and out of the protected directory. So its clear access is controlled within the browser.

Investigating further it appears that it's not possible to log out unless you implement a rather convoluted work around:
https://stackoverflow.com/questions/233 ... entication

While this may be acceptable for the friends and family I wish to give access (I'm not too concerned if users of the same computer fail to maintain good practice and always logout from their session.) it may not be for others reading this topic as it seems it relies on the visitor fully closing down their browser or logging out of their session on the computer.

Have you any thoughts on this?

User avatar
Arvid
FlatPress Coder
Posts: 558
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Is FlatPress For Me?

Post by Arvid » Thu Dec 31, 2020 8:57 pm

Hi,

htaccess is not a classic user account / "login logout" mechanism. It's more like giving your door key to friends so they (and only they) can visit you.
Your browser is able to store the credentials (so the htaccess login dialog will be pre-filled the next time), but it "forgets" you're authenticated on closing the browser window. A explicit logout is not neccessary here.

You're right, this should clearly be stated: Basic authentication via htaccess is not account management as you know it from, say, this forum here. It is the right thing though if you'd like to give a (not too big) group of people access to a web site.

Hope you have a good start with FlatPress! :)

All the best,
Arvid

laborix
Posts: 118
Joined: Sat Feb 16, 2019 3:51 pm

Re: Is FlatPress For Me?

Post by laborix » Fri Jan 01, 2021 10:26 am

NorfolkGreg wrote: ↑Wed Dec 30, 2020 10:11 pm... Some of my current content is available to the public and some restricted to family members or friends only. ...
First of all Flatpress is designed as a single user blog system, but with manual changes often a bit more is possible.
Take a look here (old Forum - Posting: Private Team blog - September 2009)
archive/discussion/831

I'm not sure if it helps you, but it is possible that it will work today. On the other hand, maybe Arvid can port the plugin/approach mentioned in this forum posting to the current Flatpress version.

Happy new Year

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: Is FlatPress For Me?

Post by NorfolkGreg » Fri Jan 01, 2021 11:05 pm

laborix wrote: ↑Fri Jan 01, 2021 10:26 am First of all Flatpress is designed as a single user blog system, but with manual changes often a bit more is possible.
Take a look here (old Forum - Posting: Private Team blog - September 2009)
archive/discussion/831

I'm not sure if it helps you
I don't think it does (but may have missed something in reading it too fast).

What I am looking for is software designed for single author but with multiple separated audiences. FlatPress passes the first test but, in a default installation, appears to fail the second.

My blog reports on the wildlife around our home some of which can be seen by the neighbouring holiday cottages. I don't mind helping out our neighbours who want to promote their cottages, but I only want friends and family to see the posts in my blog about what we have in our house, for obvious security reasons.

Standard forum software will allow separating the audiences and maybe I have to accept that is what I must use and forego some of the presentational features that one finds in bloging software.

It looks as if Arvid's approach may work. I'll play some more and report.

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: Is FlatPress For Me?

Post by NorfolkGreg » Fri Jan 08, 2021 5:14 pm

Well, I've had a week off FlatPress and am back to exploring.

I've think that the .htaccess approach should be acceptable for my purpose in terms of private area access, but still haven't properly thought through exactly how I will manage things so that the two instances of appear as one.

I guess it will have to work like this:
The public site will include static page with a link to the private site and the private site will have a static page containing a link to the public site and the two sites are clones of each other as far as themes and styling goes.

My existing software doesn't have "Categories". Instead I simply place a post in a particular sub-folder if it belongs to a certain category. That, of course, has the limitation that any post can only be in a single category, but does have the advantage that I can create category links across the private and public sections of the site. (Those with only public access get barred with a "private area" warning rather than access when they click on it - much the same as with the proposed .htaccess system!) However, I think I can live with that difference.

There are various other things I will need some help with but I'll create some topics in other areas with more helpful subject lines to tackle those!

Thanks for the help so far!

User avatar
Arvid
FlatPress Coder
Posts: 558
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Is FlatPress For Me?

Post by Arvid » Sat Jan 23, 2021 11:11 am

This sounds like a sensible approach to me. Let us know how it all works out in the end.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 41 guests