TWiki read only

Purpose & scope

Here is explained how to make your TWiki read only. By read only we mean a TWiki which is presented to most users (%MAINWEB%.TWikiGuest) as a normal publishing web site as opposed to a wiki web site. We acknowledge that this is not strictly in TWiki:Codev.TWikiMission yet companies wishing to manage access to their wiki may still want to implement something like that.

That article is intended to TWiki administrator and developer.


Access level

Read only TWiki typically have an extra default access level on top of the standard %MAINWEB%.TWikiGuest and %MAINWEB%.TWikiAdminGroup. We call it %MAINWEB%.ContentAdminGroup. A member of %MAINWEB%.ContentAdminGroup can edit content but can't alter the TWiki configuration.

Use cases

We identify two schemes for a read only TWikis:

  1. Read only with user registration: users can register & login but they still have a very limited or read only access to the web site. Yet login and registration action are available from topic view. That scheme applies to web shop, web community, web game.
  2. Read only without user registration: users can not register nor login. Yet content administrator can login by accessing the login script directly. It applies to any organisation or individual intending to run a publishing web site which content must be easily managed. That applies to most companies web site or estate agencies web site.

Tasks involved

Let us identify what we need to make our TWiki read only.

Disable the action buttons

To do that you need to customise TWikiWebTopicActions?. Use something like: %USERACTIONS{guest="$login$sep$print"}%

Restrict user access

Now after denying access to the Main web you may find that you have problems with some WebComponents which are defined site wide in the Main Web. You will need to define them for each public Web you want to expose. That should not be such a big deal since typically read only TWiki only expose few Webs if not only one. Moreover often those Webs have unrelated contents and you typically don't want to encourage cross web navigation in this configuration.

Those web components are:

Just create their equivalents in the public Webs :

Prevent user registration

Deny access to TWikiRegistration? for %MAINWEB%.TWikiUser by adding a DENYTOPICVIEW to that topic.