TWiki Access Control

Restricting read and write access to topics and webs, by Users and groups

TWiki Access Control allows you restrict access to single topics and entire webs, by individual user and by user Groups. Access control, combined with TWikiUserAuthentication, lets you easily create and manage an extremely flexible, fine-grained privilege system.

TIP Tip: TWiki:TWiki.TWikiAccessControlSupplement on TWiki.org has additional documentation on access control.

An Important Control Consideration

Open, freeform editing is the essence of WikiCulture - what makes TWiki different and often more effective than other collaboration tools. For that reason, it is strongly recommended that decisions to restrict read or write access to a web or a topic are made with great care - the more restrictions, the less Wiki in the mix. Experience shows that unrestricted write access works very well because:

  • Peer influence is enough to ensure that only relevant content is posted.
  • Peer editing - the ability for anyone to rearrange all content on a page - keeps topics focused.
  • In TWiki, content is transparently preserved under revision control:
    • Edits can be undone by the administrator (per default a member of TWikiAdminGroup; see #ManagingGroups).
    • Users are encouraged to edit and refactor (condense a long topic), since there's a safety net.
As a collaboration guideline:
  • Create broad-based Groups (for more and varied input), and...
  • Avoid creating view-only Users (if you can read it, you should be able to contribute to it).

Permissions settings of the webs on this TWiki site

Web Sitemap VIEW CHANGE RENAME
  Listed DENY ALLOW DENY ALLOW DENY ALLOW
Preferences Home Main              
Preferences Home TWiki on       TWikiAdminGroup   TWikiAdminGroup
Preferences Home Amadeu on            
Preferences Home ArquivoLivre on            
Preferences Home Arte on            
Preferences Home BSM on            
Preferences Home BahiaSocial              
Preferences Home BeaBa on            
Preferences Home BibliotecaLivre on            
Preferences Home Blogs on            
Preferences Home BrasilDigital on            
Preferences Home BrasilELivre on            
Preferences Home CESL on            
Preferences Home Ccsa              
Preferences Home CoberturaWiki              
Preferences Home Conexao         ConexaoGroup    
Preferences Home Cooperativas              
Preferences Home Curriculo on            
Preferences Home DarvinMarosin on            
Preferences Home DiaD on            
Preferences Home Dinamicoop              
Preferences Home Economia on            
Preferences Home EconomiaSolidaria on            
Preferences Home EducacaoLivre on            
Preferences Home Emacsbr on            
Preferences Home FSM2005 on            
Preferences Home Fatos on            
Preferences Home Festival3              
Preferences Home Festival4         FestivalBahiaGroup    
Preferences Home Flisol on            
Preferences Home Formatos on            
Preferences Home GNOMEBR on            
Preferences Home GTTemario2004 on            
Preferences Home GTWeb on            
Preferences Home Guialivre on            
Preferences Home HDC on            
Preferences Home Incubus on       IncubusGroup   EricJardim
Preferences Home InkscapeBrasil on            
Preferences Home Jogos              
Preferences Home KdeBR on       KdebrGroup   KdebrGroup
Preferences Home LGM on            
Preferences Home LinuxStokDoc              
Preferences Home Livros on            
Preferences Home MHHOB on            
Preferences Home Main.MarcioCarneiro.JPE              
Preferences Home Mentores on            
Preferences Home MinuanoDigital on            
Preferences Home MoradiaECidadania on            
Preferences Home OLPC on            
Preferences Home OOPTQ              
Preferences Home OlhosDagua on            
Preferences Home Olimpo on            
Preferences Home PCLivre on            
Preferences Home PSLAL on            
Preferences Home PSLBA on            
Preferences Home PSLBancarios on            
Preferences Home PSLBrasil on            
Preferences Home PSLGO on            
Preferences Home PSLMA on            
Preferences Home PSLMG on            
Preferences Home PSLMIP on            
Preferences Home PSLMT on            
Preferences Home PSLMulheres on            
Preferences Home PSLPI on            
Preferences Home Papers on            
Preferences Home PentahoBrasil on            
Preferences Home Pessoas on            
Preferences Home Portal on            
Preferences Home Prefeituras on       PesquisaSoftexGroup    
Preferences Home PubFisl10 on            
Preferences Home PubFisl7              
Preferences Home PubFisl8 on            
Preferences Home PubFisl9 on            
Preferences Home QuilomboDoSopapo on            
Preferences Home RedePopular              
Preferences Home RobotWars on            
Preferences Home SLRJ on            
Preferences Home Sandbox on            
Preferences Home Saudelivre on            
Preferences Home Sementes on            
Preferences Home Shakya on            
Preferences Home SoLiSC on            
Preferences Home SoftwareLivreIrece on            
Preferences Home SoftwareLivreVS on            
Preferences Home SuporteLivre              
Preferences Home TV on            
Preferences Home TWikiBar on            
Preferences Home TWikiPtbr on           TWikiAdminGroup
Preferences Home TWikibr on            
Preferences Home Telecentros on            
Preferences Home TeseSA on       TeseSAGroup    
Preferences Home TextoLivre on            
Preferences Home UNELivre on            
Preferences Home UNIMIX              
Preferences Home VilaTorres              
Preferences Home WTRD2004 on            
Preferences Home WebNordeste              

Please Note:

  • A blank in the the above table may mean either the corresponding control is absent or commented out or that it has been set to a null value. The two conditions have dramatically different and possibly opposed semantics.
  • TWikiGuest is the guest account - used by unauthenticated users.
  • The TWiki web must not deny view to TWikiGuest; otherwise, people will not be able to register.

Note: Above table comes from SitePermissions

Authentication vs. Access Control

Authentication: Identifies who a user is based on a login procedure. See TWikiUserAuthentication.

Access control: Restrict access to content based on users and groups once a user is identified.

Users and Groups

Access control is based on the familiar concept of Users and Groups. Users are defined by their WikiNames. They can then be organized in unlimited combinations by inclusion in one or more user Groups. For convenience, Groups can also be included in other Groups.

Managing Users

A user can create an account in TWikiRegistration. The following actions are performed:

  • WikiName and encrypted password are recorded using the password manager if authentication is enabled.
  • A confirmation e-mail is sent to the user.
  • A user home page with the WikiName of the user is created in the Main web.
  • The user is added to the TWikiUsers topic.

The default visitor name is TWikiGuest. This is the non-authenticated user.

Managing Groups

The following describes the standard TWiki support for groups. Your local TWiki may have an alternate group mapping manager installed. Check with your TWiki administrator if you are in doubt.

Groups are defined by group topics located in the Main web. To create a new group, visit TWikiGroups and enter the name of the new group ending in Group into the "new group" form field. This will create a new group topic with two important settings:

  • Set GROUP = < list of Users and/or Groups >
  • Set ALLOWTOPICCHANGE = < list of Users and/or Groups >

The GROUP setting is a comma-separated list of users and/or other groups. Example:

  • Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeGroup

The ALLOWTOPICCHANGE setting defines who is allowed to change the group topic; it is a comma delimited list of users and groups. You typically want to restrict that to the members of the group itself, so it should contain the name of the topic. This prevents users not in the group from editing the topic to give themselves or others access. For example, for the KasabianGroup topic write:

  • Set ALLOWTOPICCHANGE = Main.KasabianGroup

ALERT! Note: TWiki has strict formatting rules. Make sure you have three spaces, an asterisk, and an extra space in front of any access control rule.

The Super Admin Group

A number of TWiki functions (for example, renaming webs) are only available to administrators. Administrators are simply users who belong to the SuperAdminGroup. This is a standard user group, the name of which is defined by {SuperAdminGroup} setting in configure. The default name of this group is the TWikiAdminGroup. The system administrator may have chosen a different name for this group if your local TWiki uses an alternate group mapping manager but for simplicity we will use the default name TWikiAdminGroup in the rest of this topic.

You can create new administrators simply by adding them to the TWikiAdminGroup topic. For example,

  • Set GROUP = Main.ElizabethWindsor, Main.TonyBlair
A member of the Super Admin Group has unrestricted access throughout the TWiki, so only trusted staff should be added to this group.

Restricting Access

You can define who is allowed to read or write to a web or a topic. Note that some plugins may not respect access permissions.

  • Restricting VIEW blocks viewing and searching of content. When you restric VIEW to a topic or web, this also restricts INCLUDE and Formatted SEARCH from showing the content of the topics.
  • Restricting CHANGE blocks creating new topics, changing topics or attaching files.
  • Restricting RENAME prevents renaming of topics within a web.

Note that there is an important distinction between CHANGE access and RENAME access. A user can CHANGE a topic, but thanks to version control their changes cannot be lost (the history of the topic before the change is recorded). However if a topic or web is renamed, that history may be lost. Typically a site will only give RENAME access to administrators and content owners.

Controlling access to a Web

You can define restrictions on who is allowed to view a TWiki-SL web. You can restrict access to certain webs to selected Users and Groups, by:

  • authenticating all webs and restricting selected webs: Topic access in all webs is authenticated, and selected webs have restricted access.
  • authenticating and restricting selected webs only: Provide unrestricted viewing access to open webs, with authentication and restriction only on selected webs.

  • You can define these settings in the WebPreferences topic, preferable towards the end of the topic:
    • Set DENYWEB