I never got around to doing anything with it.
We have a few gaming sites and I wanted to have one userbase between them all.
I would like to protect the whole NodeBB site requiring users to log in to see anything. Ideally I would like the starpage to be a login form (I think I know how to do that with a custom home page and html widget). I've removed guest access to all categories and also removed all navigation options for non logged in users. But routes like /recent are still accessible by just typing the address in the url bar...
If you've removed find/access privileges for guests, then /recent
shouldn't show anything. If it does, then it's showing topics from categories that guests have access to.
Either way, you'll probably want to add a snippet in your custom HTML (or in a footer widget) to check for user session and redirect. This will work even on other routes like /recent.
@osirisguitar Just go to Admin -> General -> Navigation, click on the Recent icon (the clock) and turn on "Only display to logged in users"
@Bri I think he already did that. That just removes the icon from the header. His point is... users can still type the url in the address bar (mysite.com/recent) for recent route to access it.
You can make an ugly .htaccess file / Nginx conf! I guess that sucks
.htaccess does not work that way! You are logged in until you close the browser.
@pichalite I'm doing this exact thing on my forum, so I know it's possible to do without using a script or .htaccess file...
I'm pretty sure if you've disabled guest access for all categories, even if navigating directly to /recent
, an anonymous user would not be able to see it.
EDIT: @osirisguitar did I misunderstand? was your intent to disallow guest viewing of /recent? or to redirect any protected endpoint?
@Bri No, you understood right. I just want to disable /recent (and basically everything else except /) for anonymous users. And I've disabled guest access to both navigation and all categories (but you can still access it as anonymous)
So something like this, right?
ive done something like this, change the links in navigation to require to be logged in. only link i have on my main forum, is the login link, everythign else is taken away