SID-02026: Restricting access to all webs but allow user registration
| Status: |
Answered |
TWiki version: |
6.0.0 |
Perl version: |
5.14.2 |
| Category: |
CategoryAccessControl |
Server OS: |
Debian Linux 7.8 |
Last update: |
10 years ago |
What I'm trying to achieve: Authentication is required to view any web, but new users can still register.
What I've done: TWiki web has ALLOWWEBVIEW set to a specific group; TWikiRegistration has
* Set ALLOWTOPICVIEW = Main.AllUsersGroup
What I expect to happen: Non-logged in users can access the TWikiRegistration page
What happens: Non-logged in users get redirected to the login page.
What do I need to do to achieve my objective?
Thanks,
Keith
--
Keith Edmunds - 2015-02-17
Discussion and Answer
As soon as you add an access control setting you tell TWiki to authenticate the user. So this is not the way to exclude the
TWikiRegistration topic.
The easiest way is to keep the TWiki web open to all, and to lock down all webs of interest using
ALLOWWEBVIEW in the web's
WebPreferences. If you lock down the Main web make sure to add the TWikiRegistrationAgent to
ALLOWTOPICVIEW in your Main.WebPreferences.
You could also try to create a static HTML page with the content of the TWikiRegistration topic. You might need to disable
{Register}{NeedVerification}, or create a static HTML page of the confirm registration page, and patch the e-mail template to point to the static confirm registration page.
--
Peter Thoeny - 2015-02-17
Thanks Peter, that's helpful (but see below). According to the documentation (
TWikiAccessControl), TWikiRegistrationAgent needs
ALLOWWEBCHANGE on Main, not
ALLOWTOPICVIEW (so either there's a typo above or in the doco).
I now have a different problem: I can't display the TWikiRegistration page to unauthenticated users. If I click on the TWikiRegistration link in the "Please enter your username and password" box, it redisplays that same box. Once authenticated, I can get to the TWikiRegistration page. I have removed all
ALLOWWEB* and
DENYWEB* settings for TWiki and Main, but this issue persists. Is there a debug technique to find out why TWiki thinks it shouldn't display the TWikiRegistration page?
--
Keith Edmunds - 2015-02-26
Yes, the
TWikiRegistrationAgent is needed in ALLOWWEBCHANGE in the Main web.
Make sure that the
Main.TWikiPreferences and
TWiki.TWikiPreferences do not have any view restriction.
--
Peter Thoeny - 2015-02-27
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
Peter Thoeny - 2015-12-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.