DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

tips:pagecreateacl

Create Permission for Page (Dynamic, Private User Pages)

This was moved from the acl page. It should probably be put in a proper feature request submitted at the bug tracker — Andreas Gohr 2009/11/29 14:08

If you are trying to create dynamic user pages (as opposed to user name spaces in the above example) and don't want to have to create the user's page after they register, you will need to modify the ACL plugin to allow CREATE permission for pages:

Allow create permissions for pages (non-existant pages):

1) EDIT: /lib/plugins/acl/admin.php (Allow ACL to save CREATE perms for page)

Line 662 within function _html_checkboxes(…), change:

if($ispage && $perm > AUTH_EDIT){

to

if($ispage && $perm > AUTH_CREATE){

2) EDIT: /inc/auth.php (Prevent encoding of user wildcard)

Line 521 in function auth_nameencode(…), insert the code as shown:

function auth_nameencode($name,$skip_group=false){
  global $cache_authname;
  $cache =& $cache_authname;
  $name  = (string) $name;
 
  // *** Insert the Below code:
  if($name == '%USER%'){
        return($name);
  }
  // *** Insert the Above code.
 
  if (!isset($cache[$name][$skip_group])) {
...

Without these changes, your wildcard auth rule like the following will constantly get overwritten by the ACL:

people:%USER% %USER% 4

The above rule creates a private user page for each user in the people namespace with the page name the same as the username. — Sherri 2009/02/25 15:22

tips/pagecreateacl.txt · Last modified: 2009-11-29 14:09 by andi