This question about Registration: Answered
Cannot register new users when restricting webread access to only registered users of a particular group
I have the following web preference setting in Main Web Preferences
* Set ALLOWWEBVIEW = Main.RegistrationAgent, Main.AdminUser, XGroup
* Set ALLOWWEBCHANGE = Main.RegistrationAgent, Main.AdminUser, XGroup
* Set ALLOWWEBRENAME = Main.RegistrationAgent, Main.AdminUser, XGroup
This setting should allow me to restrict access to people who are in the group "XGroup" or the administrators. It should allow a WikiGuest
to register. It would then require an administrator to add the newly registered users to the group "XGroup" in order to read and/or change the pages.
Unfortunately, when I access my Wiki, and I am prompted for a login, if I press the "Register" link, the page simply refreshes to the login screen again.
I have discovered that I can register new users if I add "WikiGuest" to the ALLOWWEBVIEW flag, but I only want registered users in the Group "XGroup" to be able to view the pages.
Any help would be appreciated.
-07 Jul 2011
Okay, now I see the problem. You can set preferences in different places - topics inherit
preferences in a hierarchical fashion. See System.AccessControls
for more documentation.
If you want a topic to have "special" ACLs that are different to the preferences normally inherited from WebPreferences
, you just need to set those different ACLs on the topic itself.
Specifically, you just need to
* Set ALLOWTOPICVIEW = XGroup, WikiGuest
to your UserRegistration topic. You can hide it inside HTML comments or you can create a (hidden) meta-preference
(this creates a preference in the topic MetaData
) by going to "more topic actions..." and selecting "edit settings".
P.S. I know that we have many examples mentioning AdminUser in ACLs, but I honestly don't know why... the code will let an adminuser do something even if they aren't in the list, that's the whole point of an AdminUser.
- 07 Jul 2011