Background | |
Often, you want to create a wiki that can only be seen by people who have an account on it. One way to do this of course, is to put the wiki site behind some sort of a firewall. But if it's not an option for you, there are two other ways of doing it. Recipe 1: Setting permissions so that anonymous can't do much.
Recipe 2: "closing" the site for maintenance
The two recipes are described in details below. |
Recipe 1: Setting permissions so that anonymous can't do much. | |
Here are the steps:
Note that self-registration is not possible with this approach, unless you want to allow people to register without email validation (probably not a good idea). The reason is that people cannot access the URL for email validation until they have been validated (chicken and egg kind of thing). So it's best to disable self-registration and email validation:
From there on, you'll have to manually invite people who should have access to the site:
|
Recipe 2: "closing" the site for maintenance | |
WARNING: I have found that with this recipe, there are occasionally problems where you can't login at all! See the section below about Can't login at all Here are the steps:
By default, Admin group has permission tiki_p_access_closed_site enabled. But unless you want to give all users on the site Admin privileges (probably not a good idea), you should probably grant tiki_p_access_closed_site to a more restricted group of users. If your registration procedure is designed in such a way that people can't register without being vetted by an admin, then you can simply set this permission on Anonymous. However, if anybody can register without being vetted by an admin, then you probably need to create another group, say, TrustedUsers, and grant tiki_p_access_closed_site to that group. To grant tiki_p_access_closed_site permission to a group:
From then on, anyone who does not have permission tiki_p_access_closed_site, will not be able to acess the site, and will only see a login screen. Users who want an account will email the admin whose address is specified in the closed site message. When that admin receives a request from a user, he can create an account for him as follows:
|
Can't login at all | |
For reasons that I don't understand, if you use this recipe, you may occasionally run into trouble where the login screen stops recognizing legal users, and it looks like nobody, including admins, can access the site anymore. This seems to happen on servers where there are more than one tiki sites running. Also, it seems to happen more frequently (but not exclusively) after upgrades to the tiki software. But fear not! You can fix this problem by running tiki-install.php, and upgrading the database. |
Problem validating new users | |
Another problem which I have occasionally experienced with this recipe is that new users can't validate their account. That's because they can't access the validation URL they received by email without logging in, and they can't login before they have validated their account.
|
See also | |