Forum OpenACS Q&A: selective authentication

Posted by Pavel Boghita on
How can I give selective access to static pages within the site? For example all users can access the first page, index.tcl (which doesn't a register/login form) and when selecting some links the user gets the prompt to login/register.
I have searched for answers to this, but didn't manage to get any. Sorry if this question may have been answered before. I would appreciate the link if that's the case.


Posted by Michel Henry de Generet on
In fact it is easier to do than to explain. First you should create a package as explained in the doc. Then you could create a page (index.adp) in the www subdirectory of the new package. You have to mount your package somewhere in your web space and put some restriction on it such as read only by registered users. Et voilà!!
Posted by Pavel Boghita on
Sorry, I should have read the docs better. The fact is that I am
still using OACS 3. However I found what I needed in the docs, i.e.
admin pages section-contents or something like this.
Thanks anyway.
Posted by Pavel Boghita on
I am using OpenACS 3

I have tried to add/register static section using the content sections module. I have created a directory called /Static/ under /www/ put a index.html in there.
In the "Section url stub" field I put /Static/, or the full address of the subdirectory.
I am getting the following error: "The requested URL cannot be accessed due to a system error on this server."
I looked into "add-link-2.tcl" which is called up when I press add button, but I can't see anything that may explain the error.
I have also read the "docs" mentioned above but I still couldn't figure out how this works.

Thanks for any advice.

Posted by Ben Koot on
Hi Paul,

There's a quick and dirty way around your problem. Set up specific usergroups and use the default authorisation setting into: either open, if it's a public group, or wait, if you want to screen a user before access. I am using this approach on It will mean as a webmaster you get a mail from a new user interested in joing the group. Works fine. There are countless solutions like this for problemsets that could be solved either way. I mean the programmer's route, or the dummies route. I did learn the last 12 months that with a bit of creativity 80% of issues can be solved this way. Maybe not the way your like it, but it helps to cut down your specs list of issues you think you need to change in the code.

How are you doing by the way?


Posted by Pavel Boghita on
... just to close this thread, I found a really good tutorial and this link most elegantly provides the answer to my question.
Posted by Pavel Boghita on
As I found the answer I needed to my initial question I thought it
may be a good idea to post it in this thread. So I have added a
folder with static pages within the database (by using content
section tool). Then in the index.tcl page I have added a reference
to the page and whenever an user clicks on that link it will be
prompted to register because the folder where the referenced page
belongs to is protected.