Note: An alternative skin, TW4MW (work in progress), is available from the user preferences.

CcTiddlyPermissions

TiddlyWiki Community Wiki

Jump to: navigation, search

[edit] Permissions can be edited in the config/default.php file :

1 ..You create users by adding them to the array :

$tiddlyCfg['user'] = array("USERNAME1"=>"PASSWORD", "USERNAME2"=>"PASSWORD2");

example :

$tiddlyCfg['user'] = array("username"=>"password", "simon"=>"password");	


2 .. To create a group add a new line after the users have been defined :

$tiddlyCfg['group']['GROUPNAME'] = array("USERNAME1", "USERNAME2");

example :

$tiddlyCfg['group']['admin'] = array("username", "simon");


3 .. You can then assign permissions against the group using :

$tiddlyCfg['privilege_misc']['group_default_privilege']['GROUPNAME'] = "PRIVILEGE";

example :

$tiddlyCfg['privilege_misc']['group_default_privilege']['admin'] = "AAAA";

4 ..You can also set permissions based on groups/tags :

$tiddlyCfg['privilege']['GROUPNAME']['TAGNAME'] = "PRIVILEGE";

examples :

$tiddlyCfg['privilege']['admin']['systemConfig'] = "AAAA";
$tiddlyCfg['privilege']['user']['systemConfig'] = "ADDD";

In this case admin users are given full access to tiddlers tagged systemConfig but users can only view them.


[edit] PRIVILEGE SYSTEM

The new privilege system consist of four character, each represent a different action


privilege value

  • (A) allow
  • (D) deny
  • (U)undefine/unchange


EXAMPLE : for a privilege string "ADAU", the privilege for a particular tiddler to the user would be

  • (R) READ: allowed - the user is allowed to read
  • (C) INSERT: deny - the user is NOT allowed to insert a tiddler with a certain tag
  • (U) EDIT: allowed - the user is allow to edit the tiddler
  • (D) DELETE: undefined undefined privilege. This would be replaced by either allowed or deny depending on the config "undefined_privilege"


  • UNDEFINED (normally treated as DENY, see settings below) can be overwrited by ALLOW
  • DENY has the highest priority and could not be overwrite by ALLOW/UNDEFINED


  • NOTE: if a tiddler has several tag, of which one has deny in one of the privilege, it would be treated as deny on that privilege
  • NOTE: rename a tiddler requires EDIT privilege
  • NOTE: overwrite one tiddler with new tiddler requires EDIT privilege
  • NOTE: overwrite a tiddler(A) with another tiddler(B) require DELETE privilege for tiddler (A) , and EDIT for the overwritting tiddler (B)
Personal tools